You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plasma-workspace/0009-Make-ksmserver-s-lock-...

35 lines
1.1 KiB

From 3800aa256e2dec27ae8c80f428512ed3960d0575 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Wed, 27 Jan 2021 14:54:57 +0000
Subject: [PATCH 09/10] Make ksmserver's lock screen detection automatic
Use of a flag doesn't make it easy to share code, especially with the
systemd units.
(cherry picked from commit d3adf06c72301365b0c707f968974574e345adac)
---
ksmserver/main.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ksmserver/main.cpp b/ksmserver/main.cpp
index fcd8dd724..f01fbe755 100644
--- a/ksmserver/main.cpp
+++ b/ksmserver/main.cpp
@@ -286,6 +286,12 @@ int main(int argc, char *argv[])
flags |= KSMServer::InitFlag::NoLockScreen;
}
+ // we use the session_type here as ksmserver is already forced as X above
+ // in wayland, kwin manages the lock screen
+ if (qgetenv("XDG_SESSION_TYPE") == QByteArrayLiteral("wayland")) {
+ flags |= KSMServer::InitFlag::NoLockScreen;
+ }
+
KSMServer *server = new KSMServer(flags);
// for the KDE-already-running check in startkde
--
2.29.2