Changeset View
Changeset View
Standalone View
Standalone View
ksmserver/server.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | |||||
90 | #include <krandom.h> | 90 | #include <krandom.h> | ||
91 | #include <klauncher_interface.h> | 91 | #include <klauncher_interface.h> | ||
92 | #include <startup_interface.h> | 92 | #include <startup_interface.h> | ||
93 | #include <qstandardpaths.h> | 93 | #include <qstandardpaths.h> | ||
94 | 94 | | |||
95 | #include "kscreenlocker_interface.h" | 95 | #include "kscreenlocker_interface.h" | ||
96 | #include "kwinsession_interface.h" | 96 | #include "kwinsession_interface.h" | ||
97 | 97 | | |||
98 | #include "../config-workspace.h" | ||||
99 | | ||||
98 | KSMServer* the_server = nullptr; | 100 | KSMServer* the_server = nullptr; | ||
99 | 101 | | |||
100 | KSMServer* KSMServer::self() | 102 | KSMServer* KSMServer::self() | ||
101 | { | 103 | { | ||
102 | return the_server; | 104 | return the_server; | ||
103 | } | 105 | } | ||
104 | 106 | | |||
105 | /*! Utility function to execute a command on the local machine. Used | 107 | /*! Utility function to execute a command on the local machine. Used | ||
▲ Show 20 Lines • Show All 952 Lines • ▼ Show 20 Line(s) | 1036 | #endif | |||
1058 | 1060 | | |||
1059 | launchWM( wmStartCommands ); | 1061 | launchWM( wmStartCommands ); | ||
1060 | } | 1062 | } | ||
1061 | 1063 | | |||
1062 | void KSMServer::launchWM( const QList< QStringList >& wmStartCommands ) | 1064 | void KSMServer::launchWM( const QList< QStringList >& wmStartCommands ) | ||
1063 | { | 1065 | { | ||
1064 | assert( state == LaunchingWM ); | 1066 | assert( state == LaunchingWM ); | ||
1065 | 1067 | | |||
1066 | if (!(qEnvironmentVariableIsSet("WAYLAND_DISPLAY") || qEnvironmentVariableIsSet("WAYLAND_SOCKET"))) { | 1068 | bool shouldLaunchWm = true; | ||
1069 | if (qEnvironmentVariableIsSet("WAYLAND_DISPLAY") || qEnvironmentVariableIsSet("WAYLAND_SOCKET")) { | ||||
1070 | shouldLaunchWm = false; | ||||
1071 | } | ||||
1072 | | ||||
1073 | #ifdef PLASMA_SYSTEMD_BOOT | ||||
1074 | shouldLaunchWm = false; | ||||
1075 | #endif | ||||
1076 | | ||||
1077 | if (shouldLaunchWm) { | ||||
1067 | // when we have a window manager, we start it first and give | 1078 | // when we have a window manager, we start it first and give | ||
1068 | // it some time before launching other processes. Results in a | 1079 | // it some time before launching other processes. Results in a | ||
1069 | // visually more appealing startup. | 1080 | // visually more appealing startup. | ||
1070 | wmProcess = startApplication( wmStartCommands[ 0 ], QString(), QString(), true ); | 1081 | wmProcess = startApplication( wmStartCommands[ 0 ], QString(), QString(), true ); | ||
1071 | connect( wmProcess, SIGNAL(error(QProcess::ProcessError)), SLOT(wmProcessChange())); | 1082 | connect( wmProcess, SIGNAL(error(QProcess::ProcessError)), SLOT(wmProcessChange())); | ||
1072 | connect( wmProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(wmProcessChange())); | 1083 | connect( wmProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(wmProcessChange())); | ||
1073 | } | 1084 | } | ||
1074 | emit windowManagerLoaded(); | 1085 | emit windowManagerLoaded(); | ||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |