From e23461a6d487203ee75dc0caafcc7bcc0e6b0d2b Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 4 Oct 2021 19:48:15 +0200 Subject: [PATCH] Update clipboard patch --- qt5-qtwayland.spec | 5 +++- ...d-when-new-popup-or-window-is-opened.patch | 25 ++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/qt5-qtwayland.spec b/qt5-qtwayland.spec index 061e75e..bfea7d7 100644 --- a/qt5-qtwayland.spec +++ b/qt5-qtwayland.spec @@ -3,7 +3,7 @@ Summary: Qt5 - Wayland platform support and QtCompositor module Name: qt5-%{qt_module} Version: 5.15.2 -Release: 13%{?dist} +Release: 14%{?dist} License: LGPLv3 Url: http://www.qt.io @@ -164,6 +164,9 @@ popd %changelog +* Mon Oct 04 2021 Jan Grulich - 5.15.2-14 +- Update clipboard patch + * Mon Oct 04 2021 Jan Grulich - 5.15.2-13 - Backport clipboard fixes Resolves: bz#1957503 diff --git a/qtwayland-client-do-not-empty-clipboard-when-new-popup-or-window-is-opened.patch b/qtwayland-client-do-not-empty-clipboard-when-new-popup-or-window-is-opened.patch index 83fa2d6..c500746 100644 --- a/qtwayland-client-do-not-empty-clipboard-when-new-popup-or-window-is-opened.patch +++ b/qtwayland-client-do-not-empty-clipboard-when-new-popup-or-window-is-opened.patch @@ -14,28 +14,25 @@ Change-Id: Ia2ef826c2967b1daf1cdeb085e8dae66d090dbcf --- 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 +++ b/src/client/qwaylanddisplay.cpp -@@ -595,8 +595,21 @@ void QWaylandDisplay::handleWaylandSync() - // pair, and the latter one would be lost in the QWindowSystemInterface queue, if we issue the - // handleWindowActivated() calls immediately. +@@ -597,6 +597,19 @@ void QWaylandDisplay::handleWaylandSync() QWindow *activeWindow = mActiveWindows.empty() ? nullptr : mActiveWindows.last()->window(); -- if (activeWindow != QGuiApplication::focusWindow()) -+ if (activeWindow != QGuiApplication::focusWindow()) { -+ if (!activeWindow) { -+ if (lastInputDevice()) { + if (activeWindow != QGuiApplication::focusWindow()) + QWindowSystemInterface::handleWindowActivated(activeWindow); ++ ++ if (!activeWindow) { ++ if (lastInputDevice()) { +#if QT_CONFIG(clipboard) -+ if (auto *dataDevice = lastInputDevice()->dataDevice()) -+ dataDevice->invalidateSelectionOffer(); ++ if (auto *dataDevice = lastInputDevice()->dataDevice()) ++ dataDevice->invalidateSelectionOffer(); +#endif +#if QT_CONFIG(wayland_client_primary_selection) -+ if (auto *device = lastInputDevice()->primarySelectionDevice()) -+ device->invalidateSelectionOffer(); ++ if (auto *device = lastInputDevice()->primarySelectionDevice()) ++ device->invalidateSelectionOffer(); +#endif -+ } + } - QWindowSystemInterface::handleWindowActivated(activeWindow); + } }