summaryrefslogtreecommitdiff
path: root/user/sddm/autologin-type.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/sddm/autologin-type.patch')
-rw-r--r--user/sddm/autologin-type.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/user/sddm/autologin-type.patch b/user/sddm/autologin-type.patch
new file mode 100644
index 000000000..cc5738065
--- /dev/null
+++ b/user/sddm/autologin-type.patch
@@ -0,0 +1,31 @@
+From e81dfcd6913c4fbd1801597168291b1e396633d8 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Wed, 6 Jan 2021 16:00:34 +0100
+Subject: [PATCH] Fix sessions being started as the wrong type on autologin
+
+For autologin, the last session is used, which contains a full path.
+Display::findSessionEntry didn't handle that correctly, which led to
+X11 sessions getting started as Wayland ones (or the other way around
+before 994fa67).
+
+Fixes #1348
+---
+ src/daemon/Display.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp
+index b95f6e51e..9f1fabc68 100644
+--- a/src/daemon/Display.cpp
++++ b/src/daemon/Display.cpp
+@@ -245,6 +245,11 @@ namespace SDDM {
+ }
+
+ bool Display::findSessionEntry(const QDir &dir, const QString &name) const {
++ // Given an absolute path: Check that it matches dir
++ const QFileInfo fileInfo(name);
++ if (fileInfo.isAbsolute() && fileInfo.absolutePath() != dir.absolutePath())
++ return false;
++
+ QString fileName = name;
+
+ // append extension