Skip to content

Commit 0f4afbb

Browse files
halflinevkareh
authored andcommitted
manager: don't wait for all clients to exit before exiting
If a client gets hung up, we shouldn't hold up going to login screen. It means making a bug in a single client break the desktop. https://bugzilla.gnome.org/show_bug.cgi?id=750508 Adapted from https://gitlab.gnome.org/GNOME/gnome-session/commit/58c9323e
1 parent 2daa4af commit 0f4afbb

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

mate-session/gsm-manager.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -609,15 +609,6 @@ app_registered (GsmApp *app,
609609
}
610610
}
611611

612-
static gboolean
613-
_client_failed_to_stop (const char *id,
614-
GsmClient *client,
615-
gpointer user_data)
616-
{
617-
g_debug ("GsmManager: client failed to stop: %s, %s", gsm_client_peek_id (client), gsm_client_peek_app_id (client));
618-
return FALSE;
619-
}
620-
621612
static gboolean
622613
on_phase_timeout (GsmManager *manager)
623614
{
@@ -647,9 +638,6 @@ on_phase_timeout (GsmManager *manager)
647638
case GSM_MANAGER_PHASE_END_SESSION:
648639
break;
649640
case GSM_MANAGER_PHASE_EXIT:
650-
gsm_store_foreach (priv->clients,
651-
(GsmStoreFunc)_client_failed_to_stop,
652-
NULL);
653641
break;
654642
default:
655643
g_assert_not_reached ();
@@ -907,16 +895,12 @@ do_phase_exit (GsmManager *manager)
907895

908896
priv = gsm_manager_get_instance_private (manager);
909897
if (gsm_store_size (priv->clients) > 0) {
910-
priv->phase_timeout_id = g_timeout_add_seconds (GSM_MANAGER_EXIT_PHASE_TIMEOUT,
911-
(GSourceFunc)on_phase_timeout,
912-
manager);
913-
914898
gsm_store_foreach (priv->clients,
915899
(GsmStoreFunc)_client_stop,
916900
NULL);
917-
} else {
918-
end_phase (manager);
919901
}
902+
903+
end_phase (manager);
920904
}
921905

922906
static gboolean

0 commit comments

Comments
 (0)