port session management
Review Request #123580 - Created May 1, 2015 and submitted
a) THIS IS NO GLOBAL SM FIX! It ports kwin, but afaics, SM is broken all over the place in KF5.
Sometimes an empty kwrite window restarts (instead of the 4/5 processes I had), konsole, if restarting, doesn't restore tabs etc. etc.
This seems to be caused by the session exit, not the communication between clients and SM server.
b) there's code which seeks to benefit from specific behavior of ksmserver. I ported the detection code, BUT HAVE NO IDEA WHETHER THOSE ASSUMPTIONS STILL HOLD or how to test that.
=> proposing to just wait for bugreports if ksmserver5 is different itr =)
(though this might have been invalid w/ ksmserver4 already)
logged out/in, ensured the proper session config is written/read.
we land on the former VD and those clients which actually do restart are positioned correctly.
I can not confirm whether this works - for me, the applications do not restart on login (with the test user where it is enabled).
What does work for me, however, is that the last active VD remains the active VD.
from some testing, it appears KF5 based apps aren't restored at all with this patch. w/o it, they are restored, but as is known, all on first desktop.
wrt. broken state of session management, seems Stefan's patches fixed kate & konsole tab/window content restoration.
I've cherry-picked this change to my F22 kwin RPM and for some applications kwin session mangement started to work correctly.
When I compare my old KDE4 kwin session file with the new KF5 kwin session file I noticed that the new one only stores information for non-KDE applications (firefox, pidgin, thunderbird in my case). It does not contain "konsole", so after login all konsole windows always open somewhere on the desktop and the "iconified" state is not remembered.
Is it just me or can somebody else reproduce that too? Maybe something is still missing in kxmlgui to hanndle SM window save state requests?