Guard mResizeDirty by the correctMutex

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>
This commit is contained in:
David Edmundson 2022-02-03 19:42:33 +00:00
parent d9c88ebb91
commit 077df2acef

View File

@ -372,11 +372,12 @@ void QWaylandWindow::setGeometry(const QRect &rect)
if (mWindowDecorationEnabled)
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());