After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702575 - session end handling is broken
session end handling is broken
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-18 15:46 UTC by Matthias Clasen
Modified: 2013-06-24 03:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Re-show the end session dialog when an inhibitor disappears (1.87 KB, patch)
2013-06-18 19:24 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2013-06-18 15:46:40 UTC
Steps to reproduce:

1. Open gedit with an unsaved document
2. Click Log out in the shell menu
3. In the dialog click on gedit
4. Close gedit without saving

Now you are stuck in the query end session phase
Further clicks on the Log out menuitem don't have any effect
Comment 1 Matthias Clasen 2013-06-18 19:24:18 UTC
Created attachment 247205 [details] [review]
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.
Comment 2 Ray Strode [halfline] 2013-06-19 11:46:37 UTC
Review of attachment 247205 [details] [review]:

to give a little more details on what's going on here...  gedit no longer registers with the session. It does register an inhibitor, though.  We currently only reshow the dialog when a registered client goes away.  Since gedit is never registered, we don't reshow the dialog.  This patch makes it so that we reshow the dialog when the dbus connection associated with an inhibitor is closed, regardless of whether the app on the other end of that connection is registered.

I chatted with mccann a bit about this.  The consensus following that conversation was we shouldn't be reshowing the dialog at all. If a user jumps to an app then we should cancel log out. they can't reinitiate log out again after having dealt with it.  That will require reverting commit f3d824105ed96271b8284fde510594af64164d34 and changing the shell to do a cancel request itself when something is chosen from the list.

::: gnome-session/gsm-manager.c
@@ +1922,3 @@
+                } else {
+                        end_session_or_show_fallback_dialog (manager);
+                }

so this does mean we'll call end_session_or_show_shell_dialog twice in the case where an app is registered with the session manager.  That should be harmless, though, i think.
Comment 3 Ray Strode [halfline] 2013-06-19 15:40:42 UTC
Comment on attachment 247205 [details] [review]
Re-show the end session dialog when an inhibitor disappears

(of course, this bug fix can go in before we fix the implementation to match the design)
Comment 4 Matthias Clasen 2013-06-24 03:39:28 UTC
Attachment 247205 [details] pushed as 24d7bd7 - Re-show the end session dialog when an inhibitor disappears