From: Debian Qt/KDE Maintainers Date: Thu, 12 Jan 2023 11:43:32 +0000 (+0000) Subject: use wayland platform plugin on GNOME wayland sessions by default X-Git-Tag: archive/raspbian/5.15.7+dfsg-3+rpi1^2~18 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2b7b52187a831724ed4a6f876e12f581c1276bd4;p=qtbase-opensource-src.git use wayland platform plugin on GNOME wayland sessions by default 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 --- diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 87643a3a3..8282bd345 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -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