Add support for primary-selection-unstable-v1 protocol

Fix inverse repeat rate implementation
This commit is contained in:
Jan Grulich 2019-12-12 13:22:39 +01:00
parent 3060109ace
commit bf173231d5
4 changed files with 1702 additions and 1 deletions

View File

@ -3,7 +3,7 @@
Summary: Qt5 - Wayland platform support and QtCompositor module
Name: qt5-%{qt_module}
Version: 5.13.2
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv3
Url: http://www.qt.io
@ -13,6 +13,10 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod
# Upstream patches
Patch0: qtwayland-do-not-redraw-decorations-everytime.patch
Patch1: qtwayland-fix-100ms-freeze-when-apps-dont-swap-after-deliverupdaterequest.patch
Patch2: qtwayland-fix-inverse-repeat-rate-implementation.patch
Patch3: qtwayland-fix-crash-when-showing-child-window-with-hidden-parent.patch
Patch10: qtwayland-implement-primary-selection-unstable-v1.patch
# Upstreamable patches
# https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome
@ -42,6 +46,8 @@ BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libinput)
BuildRequires: libXext-devel
BuildRequires: tree
%description
%{summary}.
@ -122,6 +128,10 @@ popd
%changelog
* Wed Dec 11 2019 Jan Grulich <jgrulich@redhat.com> - 5.13.2-2
- Add support for primary-selection-unstable-v1 protocol
- Fix inverse repeat rate implementation
* Mon Dec 09 2019 Jan Grulich <jgrulich@redhat.com> - 5.13.2-1
- 5.13.2

View File

@ -0,0 +1,48 @@
From 962b9be7992cef672cb6307af5653c97382c334f Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Date: Fri, 1 Nov 2019 11:24:26 +0100
Subject: Client: Fix crash when showing a child window with a hidden parent
[ChangeLog][QPA plugin] Fixed a crash when showing a window with a hidden
parent.
Now we just avoid creating the subsurface, so nothing is shown. Seems to be
the same behavior as on xcb.
Fixes: QTBUG-79674
Change-Id: Ia46fcd9a0da5aad4704816a41515cb1e128ac65f
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 78524f6f..27e38ccf 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -109,6 +109,10 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion)
return nullptr;
}
+ // Make sure we don't pass NULL surfaces to libwayland (crashes)
+ Q_ASSERT(parent->object());
+ Q_ASSERT(window->object());
+
return mSubCompositor->get_subsurface(window->object(), parent->object());
}
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 8d34afd1..7098568b 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -124,9 +124,10 @@ void QWaylandWindow::initWindow()
if (shouldCreateSubSurface()) {
Q_ASSERT(!mSubSurfaceWindow);
- QWaylandWindow *p = static_cast<QWaylandWindow *>(QPlatformWindow::parent());
- if (::wl_subsurface *ss = mDisplay->createSubSurface(this, p)) {
- mSubSurfaceWindow = new QWaylandSubSurface(this, p, ss);
+ auto *parent = static_cast<QWaylandWindow *>(QPlatformWindow::parent());
+ if (parent->object()) {
+ if (::wl_subsurface *subsurface = mDisplay->createSubSurface(this, parent))
+ mSubSurfaceWindow = new QWaylandSubSurface(this, parent, subsurface);
}
} else if (shouldCreateShellSurface()) {
Q_ASSERT(!mShellSurface);

View File

@ -0,0 +1,13 @@
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index eefd048..5819763 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -85,7 +85,7 @@ QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p)
// or the server didn't send an enter event first.
return;
}
- mRepeatTimer.setInterval(mRepeatRate);
+ mRepeatTimer.setInterval(1000 / mRepeatRate);
handleKey(mRepeatKey.time, QEvent::KeyRelease, mRepeatKey.key, mRepeatKey.modifiers,
mRepeatKey.code, mRepeatKey.nativeVirtualKey, mRepeatKey.nativeModifiers,
mRepeatKey.text, true);

File diff suppressed because it is too large Load Diff