Review Request 110663: Don't save state of running activities unless asked to by the session manager

Simon Persson simonpersson1 at
Wed May 29 11:02:05 BST 2013

This is an automatically generated e-mail. To reply, visit:

(Updated May 29, 2013, 10:02 a.m.)

Review request for kde-workspace and Ivan Čukić.


Check the ksmserver config file for which session should be restored. Manually saved session gets saved in separate config file entries.

I was also trying to make kamd crash-safe when ksmserver is set to restore manually saved session, I tried adding a cleanShutdown entry to the config file, it would get set to false after restoring a session and to true in the Activities destructor. I did some changes to main() so that the destructors would get called. Unfortunately it was still not enough as it seems kamd is not asked nicely to quit on logout, but rather killed.
Decided to keep the changes so that destructors are called at least in the case of a "nice" shutdown.


Only save state of currently running session when asked to by the session manager. This will support activities in the "restore manually saved session" function of the session manager.

Relies on review

Diffs (updated)

  src/service/Activities.cpp 9e09c9f 
  src/service/Activities_p.h 5f3304d 
  src/service/Application.h 2e84b27 
  src/service/Application.cpp 54cbf8a 
  src/service/jobs/ksmserver/KSMServer.h 7e42e56 
  src/service/jobs/ksmserver/KSMServer.cpp 888df1f 



Tested by running a full kde session compiled from master. Saw that with "restore previous session" set there was no regression (only change would be that a power failure or crash of ksmserver would now result in the current state of running activities not getting saved, hardly critical I would say).
Also saw that "restore manually saved session" now restores activities as they were when the session was saved.


Simon Persson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list