summaryrefslogtreecommitdiff
path: root/x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch')
-rw-r--r--x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch b/x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch
new file mode 100644
index 000000000000..57d138875bea
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch
@@ -0,0 +1,24 @@
+From e27b70957505dc7b986ab2fa68219af546c63344 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Fri, 30 Jun 2023 09:42:58 +0200
+Subject: [PATCH] greeter: Look at WAYLAND_DISPLAY for platform detection
+
+When running sddm-greeter manually in a wayland session, it otherwise
+misdetects that as xcb.
+---
+ src/greeter/GreeterApp.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp
+index c2978d67e..4e4f65301 100644
+--- a/src/greeter/GreeterApp.cpp
++++ b/src/greeter/GreeterApp.cpp
+@@ -319,7 +319,7 @@ int main(int argc, char **argv)
+ platform = QString::fromUtf8(qgetenv("QT_QPA_PLATFORM"));
+ }
+ if (platform.isEmpty()) {
+- platform = QStringLiteral("xcb");
++ platform = qEnvironmentVariableIsSet("WAYLAND_DISPLAY") ? QStringLiteral("wayland") : QStringLiteral("xcb");
+ }
+
+ // Install message handler