mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
ksmserver: start kded service in autostart zero phase
org.kde.kded service is now not started by kdeinit4 (the program that owns org.kde.klauncher) nor by KDateTime (indirectly by KSystemTimeZones) and that was the assumption in KSMServer. note that there is no emission for kded phase done from ksmserver which ksplash checks for Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5f79b1c6b7
commit
ad4753db4a
3 changed files with 22 additions and 16 deletions
|
@ -63,18 +63,7 @@ should be in startup.cpp and going down in that source file should
|
|||
follow the startup order (but note that this is just a documentation
|
||||
which may get outdated, so in case of doubts the source wins ;) ).
|
||||
|
||||
The startkde scripts already launches kdeinit, which in turns launches
|
||||
KDE daemons like dbus daemon, klauncher and kded. Kded loads autoloaded
|
||||
kded modules, i.e. those that have X-KDE-Kded-autoload=true in .desktop
|
||||
files. The exact way autoloading works is controlled by X-KDE-Kded-phase=,
|
||||
which may be 0, 1 or 2 (the default). Kded phase 0 means the module is
|
||||
always loaded by kded, even outside of KDE session. It should used only
|
||||
by kded modules which must be always running. Kded phase 1 modules are
|
||||
loaded right after kded startup, but only during KDE startup, i.e. it is
|
||||
for modules that are always needed by the KDE session. Phase 2 modules
|
||||
will be loaded later. [More information about kded modules could be
|
||||
found in kdelibs/kded/HOWTO]
|
||||
|
||||
The startkde scripts already launches kdeinit, which owns klauncher.
|
||||
Startkde also launches kcminit, which performs initialization done by kcontrol
|
||||
modules. There are three kcminit phases, 0, 1 and 2, controlled
|
||||
by X-KDE-Init-Phase= in the .desktop file, which defaults to 1. Phase 0 kcminit
|
||||
|
@ -85,7 +74,18 @@ modules kcminit returns and waits.
|
|||
|
||||
When ksmserver is launched, the first thing it does is launching
|
||||
the window manager, as the WM is necessary before any windows are possibly
|
||||
shown. When the WM is ready, ksmserver tells klauncher to perform autostart
|
||||
shown. When the WM is ready, ksmserver launchers kded. Kded loads autoloaded
|
||||
kded modules, i.e. those that have X-KDE-Kded-autoload=true in .desktop
|
||||
files. The exact way autoloading works is controlled by X-KDE-Kded-phase=,
|
||||
which may be 0, 1 or 2 (the default). Kded phase 0 means the module is
|
||||
always loaded by kded, even outside of KDE session. It should used only
|
||||
by kded modules which must be always running. Kded phase 1 modules are
|
||||
loaded right after kded startup, but only during KDE startup, i.e. it is
|
||||
for modules that are always needed by the KDE session. Phase 2 modules
|
||||
will be loaded later. [More information about kded modules could be
|
||||
found in kdelibs/kded/HOWTO]
|
||||
|
||||
The next thing ksmserver does is to tell klauncher to perform autostart
|
||||
phase 0 ($KDEHOME/share/autostart). There are 3 autostart phases, 0, 1 and 2,
|
||||
defined by X-KDE-autostart-phase, defaulting to 2. Phase 0 is reserved only
|
||||
for the actual visible base components of KDE, i.e. Plasma, in order to make
|
||||
|
|
|
@ -217,13 +217,12 @@ private:
|
|||
QList<KSMListener*> listener;
|
||||
QList<KSMClient*> clients;
|
||||
|
||||
enum State
|
||||
{
|
||||
enum State {
|
||||
Idle,
|
||||
LaunchingWM, AutoStart0, KcmInitPhase1, AutoStart1, Restoring, FinishingStartup, // startup
|
||||
Shutdown, Checkpoint, Killing, KillingWM, WaitingForKNotify, // shutdown
|
||||
ClosingSubSession, KillingSubSession, RestoringSubSession
|
||||
};
|
||||
};
|
||||
State state;
|
||||
bool dialogActive;
|
||||
bool saveSession;
|
||||
|
|
|
@ -206,9 +206,16 @@ void KSMServer::autoStart0()
|
|||
if( !checkStartupSuspend())
|
||||
return;
|
||||
state = AutoStart0;
|
||||
|
||||
static const QString kdedInterface = QString::fromLatin1("org.kde.kded");
|
||||
QDBusConnectionInterface* sessionInterface = QDBusConnection::sessionBus().interface();
|
||||
if (!sessionInterface->isServiceRegistered(kdedInterface)) {
|
||||
sessionInterface->startService(kdedInterface);
|
||||
}
|
||||
#ifdef KSMSERVER_STARTUP_DEBUG1
|
||||
kDebug() << t.elapsed();
|
||||
#endif
|
||||
|
||||
org::kde::KLauncher klauncher("org.kde.klauncher", "/KLauncher", QDBusConnection::sessionBus());
|
||||
klauncher.autoStart((int)0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue