summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorJan Grulich <jgrulich@redhat.com>2021-09-07 13:01:44 +0200
committerJan Grulich <jgrulich@redhat.com>2021-09-09 16:11:13 +0200
commitdda7dab8274991e4a61a97c352d4367f8f815bb9 (patch)
tree8e9772f6b530a89bd57ac68a0e5d02a10da9e486 /src/gui/kernel
parent2c0bdd38cbba17d3a7ebb51f2a693371f21db24c (diff)
Use wayland platform plugin on GNOME wayland sessions by default
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. Pick-to: 6.2 Change-Id: I943e0bb969f384bdc3c603e290ce9c8358b70f63 Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qguiapplication.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b1e4c0e882..fa12f5f16c 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1402,16 +1402,9 @@ void QGuiApplicationPrivate::createPlatformIntegration()
}
const bool defaultIsWayland = !defaultIsXcb && platformPluginBase.startsWith("wayland");
- bool isGnome = false;
const QByteArray waylandPlatformName = defaultIsWayland ? platformName : "wayland";
if (hasWaylandDisplay || isWaylandSessionType) {
- const QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
- const QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
- isGnome = currentDesktop.contains("gnome") || sessionDesktop.contains("gnome");
- if (isGnome)
- preferredPlatformOrder.append(waylandPlatformName);
- else
- preferredPlatformOrder.prepend(waylandPlatformName);
+ preferredPlatformOrder.prepend(waylandPlatformName);
if (defaultIsWayland)
platformName.clear();
@@ -1479,14 +1472,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
argc = j;
}
-#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
- if ((hasWaylandDisplay || isWaylandSessionType) && isGnome && !platformExplicitlySelected) {
- qInfo() << "Warning: Ignoring WAYLAND_DISPLAY on Gnome."
- << "Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.";
- }
-#else
Q_UNUSED(platformExplicitlySelected);
-#endif
init_platform(QLatin1String(platformName), platformPluginPath, platformThemeName, argc, argv);