summaryrefslogtreecommitdiffstats
path: root/source/kde/kde/patch/plasma-workspace/0001-Set-GTK_BACKEND-x11-in-a-wayland-session.patch
blob: 8bd445da79ddd44ea7f9066a7e4026aabf4c6c4d (plain) (blame)
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
From 3deadbfcdf776eb0c994bb4d719e601160943bfa Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Wed, 28 Aug 2019 15:09:49 +0200
Subject: [PATCH] Set GTK_BACKEND=x11 in a wayland session

Works around missing window decorations and broken config file reading
---
 startkde/startplasma-waylandsession.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/startkde/startplasma-waylandsession.cpp b/startkde/startplasma-waylandsession.cpp
index 87c71c6b3..5d0b3f65f 100644
--- a/startkde/startplasma-waylandsession.cpp
+++ b/startkde/startplasma-waylandsession.cpp
@@ -45,6 +45,11 @@ int main(int /*argc*/, char** /*argv*/)
     out << "startplasma-waylandsession: Starting up...";
 
     if (qEnvironmentVariableIsSet("DISPLAY")) {
+        // GTK3 uses the wayland backend by default, but its implementation is not correct
+        // enough to work well here. Window decorations are missing, for instance.
+        if (!qEnvironmentVariableIsSet("GDK_BACKEND")) {
+            qputenv("GDK_BACKEND", "x11");
+        }
         setupX11();
     } else {
         qWarning() << "running kwin without Xwayland support";
-- 
2.22.0