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.
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.
BUG: 427688
Summary: Instead, have KSMServer talk to us directly on DBus.
Test Plan: Depends on D28616
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28617
Summary:
Currently kwin opens a second ICE connection to ksmserver in order to
tell the state of kwin's whether we're logging out and saving clients or
not.
This requires that kwin launches after ksmserver to have the connection
which is a dependency I want to break.
Practically this code is already ksmserver specific as it relies on some
custom code that sends the first saveState request to kwin first.
Instead we can replace it with a bespoke IPC over DBus and siplify the
code both end. This will allow several other future enhancements that we
want with regards to handling the session state, as well as make an
effort platform agnostic session management, as well as cleaning up some
complex code.
Ksmserver calls into kwin, rather than having kwin watch ksmserver state
to allow us make sure it's race free.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: romangg, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24862