Kwin and session management
Open, Needs TriagePublic

Description

Copying the relevant future notes from T9779 which is now closed

ksmserver was split up, but the close tie in with kwin remains. We need to break that.

Kwin and ksmserver both use ICE to communicate session state, it's really not applicable for this job as the window manager is a special case. It's full of hacks on both sides. Kwin even needs two session manager connections to make things work :/

I intend to make a super simple DBus interface between startplasma and kwin to specify the session key used by ksmserver, explicitly save kwin

This will:

  • fix all the unreadable code in sm.cpp
  • mean kwin can start before ksmserver, which will give yet another speed boost, also is a blocker in correct systemd unit adoption
  • have some X/wayland separation. Application wayland session management is still not entirely clear, but a lesson from this is that the window manager will be a special case with a separate API
  • better support for knowing when we're restoring sessions/quitting which could be used for some nicer effects
  • get rid of the horrific fake offscreen window to trigger the logout effect KSmServer::createLogoutEffectWidget which is also X specific

Intended DBus API is

void setState(int state) //starting up, normal, prompting to quit apps, closing down
void save(string sessionId, sessionKey)
void restore(string sessionId)