From 3daa7bd2c58f976ee34bafd9c19650b70ff1bf7e Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Sun, 23 Jun 2019 14:53:32 +0530 Subject: [PATCH] Don't start ksmserver with lockscreen integration on wayland Summary: Fixes regression from the startkde C++ re-write which made ksmserver start the kscreenlocker in wayland session, resulting in the double lockscreeens. Test Plan: after applying patch I only get one lockscreen Reviewers: apol Reviewed By: apol Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D22021 --- startkde/startplasma-waylandsession.cpp | 2 +- startkde/startplasma-x11.cpp | 2 +- startkde/startplasma.cpp | 10 +++++++--- startkde/startplasma.h | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) 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();