blob: 0081f3d4e8a36fe1768aeb77a0c17ec9ff962bfe (
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
25
26
27
28
29
30
31
32
|
From 07631f2ef00a52d883d0fd47ff7d1e1a6bc6358f Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Fri, 30 Jun 2023 09:44:37 +0200
Subject: [PATCH] Ignore InputMethod=qtvirtualkeyboard on wayland
Using QT_IM_MODULE=qtvirtualkeyboard in wayland client applications is not
supported by Qt, but is sddm's builtin default. Avoid setting that.
---
src/greeter/GreeterApp.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp
index 4e4f65301..01613cc66 100644
--- a/src/greeter/GreeterApp.cpp
+++ b/src/greeter/GreeterApp.cpp
@@ -351,8 +351,14 @@ int main(int argc, char **argv)
qputenv("KDE_DEBUG", "1");
// Qt IM module
- if (!SDDM::mainConfig.InputMethod.get().isEmpty())
- qputenv("QT_IM_MODULE", SDDM::mainConfig.InputMethod.get().toLocal8Bit().constData());
+ QString inputMethod = SDDM::mainConfig.InputMethod.get();
+ // Using qtvirtualkeyboard as IM on wayland doesn't really work,
+ // it has to be done by the compositor instead.
+ if (platform.startsWith(QStringLiteral("wayland")) && inputMethod == QStringLiteral("qtvirtualkeyboard"))
+ inputMethod = QString{};
+
+ if (!inputMethod.isEmpty())
+ qputenv("QT_IM_MODULE", inputMethod.toLocal8Bit());
QGuiApplication app(argc, argv);
SDDM::SignalHandler s;
|