Skip to content

Commit 5ce3011

Browse files
committed
csm-manager.c: Close the end-session dialog before trying to lock
the screen during suspend/hibernate. The cinnamon session dialog holds a 'grab' when it's active. We then attempt to lock the screen, and the screensaver tries to get its own grab, repeatedly failing. Once it finally gives up suspend/hibernate can proceed. We already close the dialog before attempting to switch users, but for some reason didn't follow the same pattern here. Ref: linuxmint/cinnamon#13552
1 parent 43587a7 commit 5ce3011

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cinnamon-session/csm-manager.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,12 +1232,12 @@ manager_switch_user (CsmManager *manager)
12321232
static void
12331233
manager_attempt_hibernate (CsmManager *manager)
12341234
{
1235+
close_end_session_dialog (manager);
1236+
12351237
/* lock the screen before we try anything. If it all fails, at least the screen is locked
12361238
* (if preferences dictate it) */
12371239
manager_perhaps_lock (manager);
12381240

1239-
close_end_session_dialog (manager);
1240-
12411241
if (csm_system_can_hibernate (manager->priv->system)) {
12421242
csm_system_hibernate (manager->priv->system);
12431243
}
@@ -1246,12 +1246,12 @@ manager_attempt_hibernate (CsmManager *manager)
12461246
static void
12471247
manager_attempt_suspend (CsmManager *manager)
12481248
{
1249+
close_end_session_dialog (manager);
1250+
12491251
/* lock the screen before we try anything. If it all fails, at least the screen is locked
12501252
* (if preferences dictate it) */
12511253
manager_perhaps_lock (manager);
12521254

1253-
close_end_session_dialog (manager);
1254-
12551255
if (g_settings_get_boolean (manager->priv->settings, KEY_PREFER_HYBRID_SLEEP) &&
12561256
csm_system_can_hybrid_sleep (manager->priv->system)) {
12571257
csm_system_hybrid_sleep (manager->priv->system);

0 commit comments

Comments
 (0)