diff options
author | Jan Grulich <jgrulich@redhat.com> | 2021-09-07 13:01:44 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-10 06:04:47 +0000 |
commit | 75c6f11a36335ac1dcc3d352883910b3d7461232 (patch) | |
tree | b372a49d271f903afddff77083b085f0b5691f2e /src/gui | |
parent | bb1aad4a1c6f4ad869083185fc428dfd7f026bc8 (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.
Change-Id: I943e0bb969f384bdc3c603e290ce9c8358b70f63
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dda7dab8274991e4a61a97c352d4367f8f815bb9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index dcfc53290a..52106c79b1 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); |