From 9b04b4eabac8256c81272d58f7d1c2bd895c977c Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Thu, 15 Oct 2015 21:55:29 +0100 Subject: Only wait 1 second max on logout/shutdown Ported from https://github.com/linuxmint/cinnamon-session/commit/73048abbfe05f882fed31365a1fe5b5733b6b7f6 --- mate-session/gsm-manager.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mate-session') diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c index c3c7c12..db392b8 100644 --- a/mate-session/gsm-manager.c +++ b/mate-session/gsm-manager.c @@ -74,6 +74,11 @@ #define GSM_MANAGER_PHASE_TIMEOUT 30 /* seconds */ +/* In the exit phase, all apps were already given the chance to inhibit the session end + * At that stage we don't want to wait much for apps to respond, we want to exit, and fast. + */ +#define GSM_MANAGER_EXIT_PHASE_TIMEOUT 1 /* seconds */ + #define MDM_FLEXISERVER_COMMAND "mdmflexiserver" #define MDM_FLEXISERVER_ARGS "--startnew Standard" @@ -876,7 +881,7 @@ static void do_phase_exit (GsmManager *manager) { if (gsm_store_size (manager->priv->clients) > 0) { - manager->priv->phase_timeout_id = g_timeout_add_seconds (GSM_MANAGER_PHASE_TIMEOUT, + manager->priv->phase_timeout_id = g_timeout_add_seconds (GSM_MANAGER_EXIT_PHASE_TIMEOUT, (GSourceFunc)on_phase_timeout, manager); -- cgit v1.2.1