[evolution] EShell: Check cookie before calling gtk_application_uninhibit().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EShell: Check cookie before calling gtk_application_uninhibit().
- Date: Fri, 31 May 2013 14:33:37 +0000 (UTC)
commit afdbd662d1586a83982d63b355c3852ff47be651
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri May 31 10:31:31 2013 -0400
EShell: Check cookie before calling gtk_application_uninhibit().
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 40a771c..3ca64df 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]