diff --git a/startkde/startplasma-waylandsession.cpp b/startkde/startplasma-waylandsession.cpp index c164bc4ba..87c71c6b3 100644 --- a/startkde/startplasma-waylandsession.cpp +++ b/startkde/startplasma-waylandsession.cpp @@ -59,7 +59,7 @@ int main(int /*argc*/, char** /*argv*/) if (!startKDEInit()) return 3; - if (!startKSMServer()) + if (!startKSMServer(true)) return 4; // Anything after here is logout diff --git a/startkde/startplasma-x11.cpp b/startkde/startplasma-x11.cpp index f5e08bcbf..44c0cfcac 100644 --- a/startkde/startplasma-x11.cpp +++ b/startkde/startplasma-x11.cpp @@ -100,7 +100,7 @@ int main(int /*argc*/, char** /*argv*/) if (!startKDEInit()) return 1; - if (!startKSMServer()) + if (!startKSMServer(false)) return 1; // Anything after here is logout diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp index cc5cd2bc4..ed013d5cb 100644 --- a/startkde/startplasma.cpp +++ b/startkde/startplasma.cpp @@ -338,7 +338,7 @@ bool startKDEInit() return true; } -bool startKSMServer() +bool startKSMServer(bool wayland) { // finally, give the session control to the session manager // see kdebase/ksmserver for the description of the rest of the startup sequence @@ -355,8 +355,12 @@ bool startKSMServer() QStringList ksmserverOptions = { QStringLiteral(CMAKE_INSTALL_FULL_BINDIR "/ksmserver") }; - if (desktopLockedAtStart) { - ksmserverOptions << QStringLiteral("--lockscreen"); + if (wayland) { + ksmserverOptions << QStringLiteral("--no-lockscreen"); + } else { + if (desktopLockedAtStart) { + ksmserverOptions << QStringLiteral("--lockscreen"); + } } const auto exitCode = runSync(QStringLiteral("kwrapper5"), ksmserverOptions); diff --git a/startkde/startplasma.h b/startkde/startplasma.h index 5fe086593..271c71456 100644 --- a/startkde/startplasma.h +++ b/startkde/startplasma.h @@ -45,7 +45,7 @@ void setupGSLib(); void setupX11(); bool startKDEInit(); -bool startKSMServer(); +bool startKSMServer(bool wayland); void waitForKonqi();