commit:     386f4b18b5bcfa51bdb9d515b79d90812f3838ad
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  9 16:10:51 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 16:25:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=386f4b18

kde-plasma/kscreenlocker: backport patch from upstream solving lock screen 
bypass

Gentoo-bug: 574270

Package-Manager: portage-2.2.27

 .../kscreenlocker-5.5.4-lockscreen-bypass.patch    | 39 ++++++++++++++++++++++
 ...-5.5.4.ebuild => kscreenlocker-5.5.4-r1.ebuild} |  5 ++-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git 
a/kde-plasma/kscreenlocker/files/kscreenlocker-5.5.4-lockscreen-bypass.patch 
b/kde-plasma/kscreenlocker/files/kscreenlocker-5.5.4-lockscreen-bypass.patch
new file mode 100644
index 0000000..6eb6789
--- /dev/null
+++ b/kde-plasma/kscreenlocker/files/kscreenlocker-5.5.4-lockscreen-bypass.patch
@@ -0,0 +1,39 @@
+From fae65f1cdd6446042b31ccd0eafd7a4c0b6623e3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <[email protected]>
+Date: Fri, 5 Feb 2016 10:30:19 +0100
+Subject: [PATCH] [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.
+
+BUG: 358125
+FIXED-IN: 5.5.5
+---
+ greeter/main.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/greeter/main.cpp b/greeter/main.cpp
+index e4e679e..5625d36 100644
+--- a/greeter/main.cpp
++++ b/greeter/main.cpp
+@@ -59,6 +59,7 @@ int main(int argc, char* argv[])
+         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"));
+-- 
+2.4.10
+

diff --git a/kde-plasma/kscreenlocker/kscreenlocker-5.5.4.ebuild 
b/kde-plasma/kscreenlocker/kscreenlocker-5.5.4-r1.ebuild
similarity index 94%
rename from kde-plasma/kscreenlocker/kscreenlocker-5.5.4.ebuild
rename to kde-plasma/kscreenlocker/kscreenlocker-5.5.4-r1.ebuild
index c67826d..a42158d 100644
--- a/kde-plasma/kscreenlocker/kscreenlocker-5.5.4.ebuild
+++ b/kde-plasma/kscreenlocker/kscreenlocker-5.5.4-r1.ebuild
@@ -53,7 +53,10 @@ RDEPEND="${COMMON_DEPEND}
        !<kde-plasma/plasma-workspace-5.4.50
 "
 
-PATCHES=( "${FILESDIR}/${PN}-5.4.90-no-SUID-no-GUID.patch" )
+PATCHES=(
+       "${FILESDIR}/${PN}-5.4.90-no-SUID-no-GUID.patch"
+       "${FILESDIR}/${P}}-lockscreen-bypass.patch"
+)
 
 src_prepare() {
        kde5_src_prepare

Reply via email to