aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-31 22:31:31 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-31 22:34:41 +0800
commitafdbd662d1586a83982d63b355c3852ff47be651 (patch)
tree626476ea360d7e03896534888b565a0e28dc64cf /shell
parent9a53ccf6cfa0d8a08f09b37f82713e9fb04f0a12 (diff)
downloadgsoc2013-evolution-afdbd662d1586a83982d63b355c3852ff47be651.tar
gsoc2013-evolution-afdbd662d1586a83982d63b355c3852ff47be651.tar.gz
gsoc2013-evolution-afdbd662d1586a83982d63b355c3852ff47be651.tar.bz2
gsoc2013-evolution-afdbd662d1586a83982d63b355c3852ff47be651.tar.lz
gsoc2013-evolution-afdbd662d1586a83982d63b355c3852ff47be651.tar.xz
gsoc2013-evolution-afdbd662d1586a83982d63b355c3852ff47be651.tar.zst
gsoc2013-evolution-afdbd662d1586a83982d63b355c3852ff47be651.zip
EShell: Check cookie before calling gtk_application_uninhibit().
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 40a771c06a..3ca64df49d 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -371,7 +371,14 @@ shell_ready_for_quit (EShell *shell,
/* Finalize the activity. */
g_object_unref (activity);
- gtk_application_uninhibit (application, shell->priv->inhibit_cookie);
+ /* XXX Inhibiting session manager actions currently only
+ * works on GNOME, so check that we obtained a valid
+ * inhibit cookie before attempting to uninhibit. */
+ if (shell->priv->inhibit_cookie > 0) {
+ gtk_application_uninhibit (
+ application, shell->priv->inhibit_cookie);
+ shell->priv->inhibit_cookie = 0;
+ }
/* Destroy all watched windows. Note, we iterate over a -copy-
* of the watched windows list because the act of destroying a