diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-05-31 22:31:31 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-05-31 22:35:08 +0800 |
commit | 8920472e46ae49859f36e31e18037c065ee73197 (patch) | |
tree | 057e9ebdf9ed837338fcdca3322d31432f3bbb64 /shell | |
parent | 6f82514dcb378d5e1742cae7c73a273c2bd0ae60 (diff) | |
download | gsoc2013-evolution-8920472e46ae49859f36e31e18037c065ee73197.tar gsoc2013-evolution-8920472e46ae49859f36e31e18037c065ee73197.tar.gz gsoc2013-evolution-8920472e46ae49859f36e31e18037c065ee73197.tar.bz2 gsoc2013-evolution-8920472e46ae49859f36e31e18037c065ee73197.tar.lz gsoc2013-evolution-8920472e46ae49859f36e31e18037c065ee73197.tar.xz gsoc2013-evolution-8920472e46ae49859f36e31e18037c065ee73197.tar.zst gsoc2013-evolution-8920472e46ae49859f36e31e18037c065ee73197.zip |
EShell: Check cookie before calling gtk_application_uninhibit().
(cherry picked from commit afdbd662d1586a83982d63b355c3852ff47be651)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 22ea2702b4..8e3cc2299f 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -400,7 +400,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 |