qt5-qtwayland/0032-Guard-mResizeDirty-by-the-correctMutex.patch

40 lines
1.5 KiB
Diff
Raw Normal View History

2023-10-08 14:36:55 +00:00
From ad92da9b721ee6faad78a5fcbbe05904455b27ab Mon Sep 17 00:00:00 2001
2022-09-20 15:38:03 +00:00
From: David Edmundson <davidedmundson@kde.org>
Date: Thu, 3 Feb 2022 19:42:33 +0000
2023-10-08 14:36:55 +00:00
Subject: [PATCH 32/59] Guard mResizeDirty by the correctMutex
2022-09-20 15:38:03 +00:00
mResizeDirty is used in the GUI thread in setCanResize which can be
called from the GUI thread. It is queried and set whilst the resizeLock
is held. We need to guard our usage.
Change-Id: I5f8dcf8aa2cb2c4bb6274103df1da9e3e268605a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 4ac96662c936821efff2875bbe555b40612caf8a)
---
src/client/qwaylandwindow.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
2023-10-08 14:36:55 +00:00
index 4e5ca97c..f8c71d9c 100644
2022-09-20 15:38:03 +00:00
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -358,11 +358,12 @@ void QWaylandWindow::setGeometry(const QRect &rect)
if (mWindowDecoration)
mWindowDecoration->update();
- if (mResizeAfterSwap && windowType() == Egl && mSentInitialResize)
+ if (mResizeAfterSwap && windowType() == Egl && mSentInitialResize) {
+ QMutexLocker lock(&mResizeLock);
mResizeDirty = true;
- else
+ } else {
QWindowSystemInterface::handleGeometryChange(window(), geometry());
-
+ }
mSentInitialResize = true;
}
QRect exposeGeometry(QPoint(), geometry().size());
--
2023-10-08 14:36:55 +00:00
2.41.0
2022-09-20 15:38:03 +00:00