On X Kwin's lifespan used to be managed by XSMP. This accidentally broke
in 5.20 as we made kwin start before ksmserver for speed purposes and
wayland preparation.
This leaves kwin to be killed by the display manager as the X connection
closes, but this can lead to deadlocks.
BUG:428817
On wayland kwin's lifespan is mapped to the lifespan of the ksmserver
binary. This is problematic as it makes our entire xwayland robustness
redundant if we ultimately rely on an application that /has/ to run in
xwayland.
Summary:
Kwin had to have two ICE connections in order to track state
indepdendently of it's session saving.
This replaces that with a more direct DBus protocol allowing for both
simplification on the kwin side as well as comunicating the logout state
better for effects.
Whilst this code temporarily complicates things, now we have this
interface the next step is drop all the isWM() stuff and do kwin
specific session management also over this interface. See T11882
Test Plan:
Added qdebug into kwin
started logging out with an unsaved file, cancelled shutdown
started logging out with, discarded file
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: broulik, apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24945