use wayland platform plugin on GNOME wayland sessions by default
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sat, 17 Dec 2022 15:20:05 +0000 (15:20 +0000)
committerDmitry Shachnev <mitya57@debian.org>
Sat, 17 Dec 2022 15:20:05 +0000 (15:20 +0000)
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=dda7dab8274991e4
Last-Update: 2022-10-16

Qt wayland platform plugin has improved quite a lot and it is now pretty
much usable on Gnome. It also improves user experience a lot on HiDPI
displays.

Gbp-Pq: Name gnome_wayland.diff

src/gui/kernel/qguiapplication.cpp

index 87643a3a39a93450c9588c74649b6b4fc7f619a3..8282bd3454f97402f6db44572e704ab48dd6542b 100644 (file)
@@ -1412,14 +1412,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
         if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) {
             platformName = QByteArrayLiteral("xcb");
         } else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) {
-            QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
-            QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
-            if (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")) {
-                qInfo() << "Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome."
-                        << "Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.";
-            } else {
-                platformName = QByteArrayLiteral("wayland");
-            }
+            platformName = QByteArrayLiteral("wayland");
         }
     }
 #ifdef QT_QPA_DEFAULT_PLATFORM_NAME