From 37060a6dd958d23678d838f38cca7d38f623b323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sat, 1 Dec 2018 13:17:02 +0100 Subject: [PATCH] Add command line option no-lockscreen to disable lock screen integration Summary: WaylandServer provides the initialization flag to disable lock screen integration. This couldn't be used yet as there is no command line flag for it. This change adds a new command line argument and hooks up the functionality. The no lock screen integration is useful for the embedded use case where KWin is just used to render one application. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D17279 --- main_wayland.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main_wayland.cpp b/main_wayland.cpp index a88896265c..199ebf7f6b 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -672,6 +672,10 @@ int main(int argc, char * argv[]) i18n("Starts the session in locked mode.")); parser.addOption(screenLockerOption); + QCommandLineOption noScreenLockerOption(QStringLiteral("no-lockscreen"), + i18n("Starts the session without lock screen support.")); + parser.addOption(noScreenLockerOption); + QCommandLineOption exitWithSessionOption(QStringLiteral("exit-with-session"), i18n("Exit after the session application, which is started by KWin, closed."), QStringLiteral("/path/to/session")); @@ -785,6 +789,8 @@ int main(int argc, char * argv[]) KWin::WaylandServer::InitalizationFlags flags; if (parser.isSet(screenLockerOption)) { flags = KWin::WaylandServer::InitalizationFlag::LockScreen; + } else if (parser.isSet(noScreenLockerOption)) { + flags = KWin::WaylandServer::InitalizationFlag::NoLockScreenIntegration; } if (!server->init(parser.value(waylandSocketOption).toUtf8(), flags)) { std::cerr << "FATAL ERROR: could not create Wayland server" << std::endl;