Use qtwayland by default on Gnome Wayland sessions

Resolves: bz#1732129
This commit is contained in:
Jan Grulich 2019-07-23 09:55:37 +02:00
parent abb914b769
commit 9c762bfb43
2 changed files with 33 additions and 1 deletions

View File

@ -53,7 +53,7 @@ BuildRequires: pkgconfig(libsystemd)
Name: qt5-qtbase
Summary: Qt5 - QtBase components
Version: 5.12.4
Release: 4%{?dist}
Release: 5%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -126,6 +126,10 @@ Patch67: https://bugreports.qt.io/secure/attachment/66353/xcberror_filter.patch
# python3
Patch68: qtbase-everywhere-src-5.11.1-python3.patch
# https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome
# https://bugzilla.redhat.com/show_bug.cgi?id=1732129
Patch80: qtbase-use-wayland-on-gnome.patch
# glibc stat
## upstream patches
@ -406,6 +410,10 @@ Qt5 libraries used for drawing widgets and OpenGL items.
#patch67 -p1 -b .xcberror_filter
%patch68 -p1
%if 0%{?fedora} > 30
%patch80 -p1 -b .use-wayland-on-gnome.patch
%endif
## upstream patches
%patch100 -p1
%patch110 -p1
@ -1033,6 +1041,10 @@ fi
%changelog
* Tue Jul 23 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.4-5
- Use qtwayland by default on Gnome Wayland sessions
Resolves: bz#1732129
* Mon Jul 15 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.4-4
- Revert "Reset QWidget's winId when backing window surface is destroyed"

View File

@ -0,0 +1,20 @@
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b8bfad4f16..676fdfad5e 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1376,14 +1376,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