Closed mtwebster closed 5 years ago
@itzexor could I ask you to try this out some time, you're more familiar with systemd, maybe you can shed some light on my second issue. Thanks
I tested and it seems to work as expected here. The inhibit applet did show inhibition by firefox when a youtube video was playing, but maybe that's a different type of inhibtion and it's not using the same signal you're talking about.
On logging out, everything seemed to exit as usual, except most of the hanging services that were left behind before are now also terminated with the dbus session restart.
I tested with sublime text 3.2.1 3207 and though I had a modified document open, it didn't interrupt logout to ask me if I wanted to save and instead just terminated. Maybe this is the behavior you're talking about? With other text editors it does seem to interrupt logout properly.
It seems to fix logout issues for me. Before this PR, I'd try to logout, and nothing would happen :) I'd try to logout again, this time I'd hear the logout sound and the session would start to exit. With this PR, it logs me out immediately, no questions asked :)
I tested inhibitors also. An unsaved document in Xed and a video playback in Xplayer successfully inhibit the logout. You're asked what to do about the doc and the movie in that case.
Sublime/MPV and many other programs don't inhibit the session, but that's on their side, not ours.
Couple remaining issues:
proxy created by cinnamon's inhibit applet does not display correct states (though this test program tracks it fine.
a couple programs that previously had no issue no longer exit properly at logout (namely sublime-text). Skipping the 'restart user bus' code resolves this (but this causes other programs to not exit cleanly.