ksmserver 2.2.1
Steven Suson
suson at TuckerEnergy.com
Tue Feb 12 18:46:38 GMT 2002
Greetings Matthias,
I hope this finds you well. Recently, I completed a partial
integration of our software system, a legacy Motif 2.x collection of
applications, into the KDE 2.2.1 desktop. Part of this included some
session management. In your README included w/in the ksmserver-2.2.1
directory, you make the comment, "To be
precise, I have never seen a single commercial application that supports
it and even within the official X11R6 distribution, 'xclock' is the only
exception." Well, it just so happens that we are one of those
applications that you haven't seen. Specifically, we even have a C
library module that our applications use to interface w/ XSMP. Through
the process of integration w/ KDE's SM, I both discovered some bugs in
our code, and a couple of problems w/ the KDE SM. One of the problems I
appeared to have solved with the patch that I am attaching; this being
the ability to issue a RequestSaveYourself. My only concern with the
patch would be that someone is calling SmcRequestSaveYourself w/o
setting shutdown to True, since w/o the patch, this would cause a
shutdown anyway. Do you know what the KApplication class is doing?
(Haven't had time to dig into the kdelibs code.) If there are no such
ill effects, would you consider incorporating the patch to the official
ksmserver?
The problem that I am still having, is that it appears that setting
the restart_style to SmRestartNever does not appear to prevent the
application from being restarted when the session is restarted (upon
login). Any ideas?
Also, please note my comment in the patch concerning Checkpointing.
I would LOVE to have this functionality, and if I can help.... I almost
tried to implement this, but decided that I needed to understand your
code much more before attempting to do so.
Thanks in advance,
Steven Suson
"Keep the faith."
P.S. To the KDevelop list: I realize that this is OT, but copied the
list as an FYI...
-------------- next part --------------
--- kdebase-2.2.1/ksmserver/server.cpp Sat Jul 28 23:56:45 2001
+++ kdebase-2.2.1/ksmserver/server.cpp.new Fri Feb 1 20:43:42 2002
@@ -309,16 +309,27 @@
}
void KSMSaveYourselfRequestProc (
- SmsConn /* smsConn */,
+ SmsConn smsConn,
SmPointer /* managerData */,
- int /* saveType */,
- Bool /* shutdown */,
- int /* interactStyle */,
+ int saveType,
+ Bool shutdown,
+ int interactStyle,
Bool fast,
- Bool /* global */
+ Bool global
)
{
- the_server->shutdown( fast );
+ if (shutdown)
+ the_server->shutdown( fast );
+ else {
+ if (!global) {
+ SmsSaveYourself( smsConn, saveType, FALSE, interactStyle, fast );
+ SmsSaveComplete( smsConn );
+ }
+ else {
+ // This would effectively be a checkpoint, which is not yet supported by KSMServer
+ ;
+ }
+ }
}
void KSMSaveYourselfPhase2RequestProc (
More information about the KDevelop
mailing list