diff --git a/qt5-qtwayland.spec b/qt5-qtwayland.spec index fd0a0df..7858b76 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: 17%{?dist} +Release: 18%{?dist} License: LGPLv3 Url: http://www.qt.io @@ -65,6 +65,8 @@ Patch44: 0044-Move-the-wayland-socket-polling-to-a-separate-event-.patch Patch53: qtwayland-client-expose-toplevel-window-state.patch # Upstreamable patches +# https://codereview.qt-project.org/c/qt/qtwayland/+/393273 +Patch100: qtwayland-client-remove-mwaitingforupdatedelivery.patch # filter qml provides %global __provides_exclude_from ^%{_qt5_archdatadir}/qml/.*\\.so$ @@ -171,6 +173,9 @@ popd %changelog +* Mon Jan 31 2022 Jan Grulich - 5.15.2-18 +- Include potential upstream fix for Plasma panel freezes + * Thu Jan 20 2022 Jan Grulich - 5.15.2-17 - Pull in latest kde/5.15 branch fixes diff --git a/qtwayland-client-remove-mwaitingforupdatedelivery.patch b/qtwayland-client-remove-mwaitingforupdatedelivery.patch new file mode 100644 index 0000000..e35af1e --- /dev/null +++ b/qtwayland-client-remove-mwaitingforupdatedelivery.patch @@ -0,0 +1,58 @@ +From 92969a01c91e7d21332be55c005bf861c89252d2 Mon Sep 17 00:00:00 2001 +From: Vlad Zahorodnii +Date: Mon, 31 Jan 2022 16:31:56 +0200 +Subject: [PATCH] Client: Make sure mWaitingForUpdateDelivery updates are + thread-safe + +Change-Id: I7e22fe49f679fb87d56bae0bc3c1d2c261ffe144 +--- + src/client/qwaylandwindow.cpp | 7 +++---- + src/client/qwaylandwindow_p.h | 2 +- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 7de19a74..b22864ab 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -638,22 +638,21 @@ void QWaylandWindow::handleFrameCallback() + mFrameCallbackElapsedTimer.invalidate(); + + // The rest can wait until we can run it on the correct thread +- if (!mWaitingForUpdateDelivery) { ++ if (!mWaitingForUpdateDelivery.loadAcquire()) { + auto doHandleExpose = [this]() { ++ mWaitingForUpdateDelivery.storeRelease(false); + bool wasExposed = isExposed(); + mFrameCallbackTimedOut = false; + if (!wasExposed && isExposed()) // Did setting mFrameCallbackTimedOut make the window exposed? + sendExposeEvent(QRect(QPoint(), geometry().size())); + if (wasExposed && hasPendingUpdateRequest()) + deliverUpdateRequest(); +- +- mWaitingForUpdateDelivery = false; + }; + + // Queued connection, to make sure we don't call handleUpdate() from inside waitForFrameSync() + // in the single-threaded case. +- mWaitingForUpdateDelivery = true; + QMetaObject::invokeMethod(this, doHandleExpose, Qt::QueuedConnection); ++ mWaitingForUpdateDelivery.storeRelease(true); + } + + mFrameSyncWait.notify_all(); +diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h +index d45980a8..a8699827 100644 +--- a/src/client/qwaylandwindow_p.h ++++ b/src/client/qwaylandwindow_p.h +@@ -228,7 +228,7 @@ protected: + WId mWindowId; + bool mWaitingForFrameCallback = false; + bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out +- bool mWaitingForUpdateDelivery = false; ++ QAtomicInteger mWaitingForUpdateDelivery = false; + int mFrameCallbackCheckIntervalTimerId = -1; + QElapsedTimer mFrameCallbackElapsedTimer; + struct ::wl_callback *mFrameCallback = nullptr; +-- +2.35.1 +