36 lines
1.5 KiB
Diff
36 lines
1.5 KiB
Diff
From: Martin Gräßlin <mgraesslin@kde.org>
|
|
Date: Tue, 09 Feb 2016 15:37:50 +0000
|
|
Subject: [greeter] Dont quit when last window closes
|
|
X-Git-Url: http://quickgit.kde.org/?p=plasma-workspace.git&a=commitdiff&h=23a9ed7ba9995570227dbcd69c23f009de7dde49
|
|
---
|
|
[greeter] Dont quit when last window closes
|
|
|
|
Qt allows to have no screens. If all XRandR screens are disconnected
|
|
there are also no QScreens. This is from an X11 perspective wrong, but
|
|
we have to deal with it. No QScreens means that all views are destroyed
|
|
and no new ones are created. Thus all windows close and the greeter
|
|
exited successfully which in turn unlocked the screen.
|
|
|
|
This change ensures that the greeter doesn't exit when all windows close.
|
|
|
|
Funnily this was not a problem with the well known issue of Qt
|
|
crashing when all screens are disconnected. The lock screen handles
|
|
crashes gracefully and just restarts or more likely Qt also crashes
|
|
the application using KSld and thus taking down the complete session.
|
|
|
|
CCBUG: 358125
|
|
---
|
|
|
|
|
|
--- a/ksmserver/screenlocker/greeter/main.cpp
|
|
+++ b/ksmserver/screenlocker/greeter/main.cpp
|
|
@@ -56,6 +56,7 @@
|
|
// explicitly disable input methods as it makes it impossible to unlock, see BUG 306932
|
|
qputenv("QT_IM_MODULE", QByteArrayLiteral("compose"));
|
|
ScreenLocker::UnlockApp app(argc, argv);
|
|
+ app.setQuitOnLastWindowClosed(false);
|
|
QCoreApplication::setApplicationName(QStringLiteral("kscreenlocker_greet"));
|
|
QCoreApplication::setApplicationVersion(QStringLiteral("0.1"));
|
|
QCoreApplication::setOrganizationDomain(QStringLiteral("kde.org"));
|
|
|