[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Autostarting prevents session restoration for KUniqueApplication
From: David Jarvie <lists () astrojar ! org ! uk>
Date: 2002-01-16 0:57:16
[Download RAW message or body]
Does KDE allow a KUniqueApplication application to be both session restored
and autostarted? In theory, one just needs to ensure that the session is
saved, and put a .desktop file in the autostart directory. However, because
of ksmserver's startup sequence, the autostart invocation occurs before the
session restoration. The application having started already, it doesn't then
seem possible for session restoration to take place since
KUniqueApplication::newInstance() doesn't get called with session restoration
'parameters'.
Is there any simple way round this problem? An unsatisfactory solution is to
create a separate application whose sole purpose is to be autostarted in
place of the main application and then runs the main application once session
restoration has taken place.
If there is no easy solution, I think that there should be two autostart
stages in ksmserver's sequence: one as at present, and a second one after
session restoration. Then, a .desktop file could specify
"X-KDE-autostart-after=session-restore" (or something similar)
or perhaps "X-KDE-autostart-after-session=true" (to avoid conflicts with any
possible autostart/session-restore.desktop file) and the application would
then be started after ksmserver's session restoration step. If this seems a
reasonable solution, I am willing to produce a patch to implement it.
[ Does this problem actually arise in real life?, you may ask. Yes. At
logout, the KUniqueApplication may either not be running, or it may have
windows open which need to be restored at login. At login, it may always need
to be started with a specific command line parameter, but in addition it
needs to restore windows previously open (if any). ]
--
David Jarvie
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic