Update clipboard patch

This commit is contained in:
Jan Grulich 2021-10-04 19:48:15 +02:00
parent 9349ec2adf
commit e23461a6d4
2 changed files with 15 additions and 15 deletions

View File

@ -3,7 +3,7 @@
Summary: Qt5 - Wayland platform support and QtCompositor module Summary: Qt5 - Wayland platform support and QtCompositor module
Name: qt5-%{qt_module} Name: qt5-%{qt_module}
Version: 5.15.2 Version: 5.15.2
Release: 13%{?dist} Release: 14%{?dist}
License: LGPLv3 License: LGPLv3
Url: http://www.qt.io Url: http://www.qt.io
@ -164,6 +164,9 @@ popd
%changelog %changelog
* Mon Oct 04 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-14
- Update clipboard patch
* Mon Oct 04 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-13 * Mon Oct 04 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-13
- Backport clipboard fixes - Backport clipboard fixes
Resolves: bz#1957503 Resolves: bz#1957503

View File

@ -14,15 +14,14 @@ Change-Id: Ia2ef826c2967b1daf1cdeb085e8dae66d090dbcf
--- ---
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 2730311..e05eee5 100644 index 2730311..9f595af 100644
--- a/src/client/qwaylanddisplay.cpp --- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp
@@ -595,8 +595,21 @@ void QWaylandDisplay::handleWaylandSync() @@ -597,6 +597,19 @@ void QWaylandDisplay::handleWaylandSync()
// pair, and the latter one would be lost in the QWindowSystemInterface queue, if we issue the
// handleWindowActivated() calls immediately.
QWindow *activeWindow = mActiveWindows.empty() ? nullptr : mActiveWindows.last()->window(); QWindow *activeWindow = mActiveWindows.empty() ? nullptr : mActiveWindows.last()->window();
- if (activeWindow != QGuiApplication::focusWindow()) if (activeWindow != QGuiApplication::focusWindow())
+ if (activeWindow != QGuiApplication::focusWindow()) { QWindowSystemInterface::handleWindowActivated(activeWindow);
+
+ if (!activeWindow) { + if (!activeWindow) {
+ if (lastInputDevice()) { + if (lastInputDevice()) {
+#if QT_CONFIG(clipboard) +#if QT_CONFIG(clipboard)
@ -34,8 +33,6 @@ index 2730311..e05eee5 100644
+ device->invalidateSelectionOffer(); + device->invalidateSelectionOffer();
+#endif +#endif
+ } + }
+ }
QWindowSystemInterface::handleWindowActivated(activeWindow);
+ } + }
} }