[gnome-session/gnome-3-8] Re-show the end session dialog when an inhibitor disappears
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/gnome-3-8] Re-show the end session dialog when an inhibitor disappears
- Date: Mon, 24 Jun 2013 03:39:24 +0000 (UTC)
commit 24d7bd7d7f80369d49095f08f238cf249ca2b765
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 18 15:19:40 2013 -0400
Re-show the end session dialog when an inhibitor disappears
The current code shows the dialog again when a client disappears.
If we don't show the dialog again on inhibitor changes, we can get
stuck in the query-end-session phase when applications take inhibitors
without registering as a client. gedit does this, for example.
https://bugzilla.gnome.org/show_bug.cgi?id=702575
gnome-session/gsm-manager.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 19d3197..c3ea1d9 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -1902,15 +1902,24 @@ remove_inhibitors_for_connection (GsmManager *manager,
const char *service_name)
{
RemoveClientData data;
+ guint count;
data.service_name = service_name;
data.manager = manager;
debug_inhibitors (manager);
- gsm_store_foreach_remove (manager->priv->inhibitors,
- (GsmStoreFunc)inhibitor_has_bus_name,
- &data);
+ count = gsm_store_foreach_remove (manager->priv->inhibitors,
+ (GsmStoreFunc)inhibitor_has_bus_name,
+ &data);
+ if (count > 0 &&
+ manager->priv->phase == GSM_MANAGER_PHASE_QUERY_END_SESSION) {
+ if (gsm_shell_is_running (manager->priv->shell)) {
+ end_session_or_show_shell_dialog (manager);
+ } else {
+ end_session_or_show_fallback_dialog (manager);
+ }
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]