blob: 57d138875bead5375e405fec6c8ae67566c680d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|