-
-
Notifications
You must be signed in to change notification settings - Fork 11
Use gnome-session interfaces to end session where possible #126
Conversation
I now realise this project is now a Focal branch so I need to work on it with Focal - which I cannot do at the moment. |
Yes, the There was talk that we may want to backport this patch to Hera, but to do so we'd have to merge this branch directly into the |
But the Focal specific master has been merged into this now so it does not run on Hera. It needs to be rebased on a commit prior to ef60783 and a PR specifying merging at that point made (is that possible?). Will GitHub then stop requiring merging master? |
It would be nice to have this in Hera unless Odin release is imminent (which it does not seem to be). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work as expected, so let's try it in daily :)
Lots of bugfixes but mostly elementary/wingpanel-indicator-session#126 which fixes NixOS#95658
Lots of bugfixes but mostly elementary/wingpanel-indicator-session#126 which fixes #95658 (cherry picked from commit 95c05e6)
Previously the
EndSessionDialog
class handled all the logic for which DBus interfaces to call when a logout/reboot/shutdown action was confirmed.It was calling methods like
terminate
andreboot
onorg.freedesktop.login1
, which is fine if you don't have an active session (i.e. you're in greeter mode). But when we're in a session, it's a lot cleaner to askgnome-session
to do these things for us as it handles talking to all of the active applications and asking them to close cleanly, rather than just killing them.So I've moved that logic out of the dialog and it's only UI code that remains. Now, when we're in an active session and a logout/shutdown button is pressed, we call the logout/reboot/shutdown methods on
org.gnome.SessionManager
, which in turn spawns theEndSessionDialog
via DBus and we either confirm or cancel that request depending on the outcome of the dialog.If we're not in an active session, we spawn the dialog manually and then call the
org.freedesktop.login1
methods as before.I found that logging out on our focal builds was really hit and miss. Most of the time you'd just end up sat looking at your wallpaper with no wingpanel/plank etc and never get kicked back to the greeter. Then you'd have to power cycle the machine to get it working again. This fixes that.
It also hopefully closes applications in the session a bit more cleanly, so hopefully we'll see a few more things saving their state a bit better.