diff options
-rw-r--r-- | src/client/qwaylandwindow.cpp | 2 | ||||
-rw-r--r-- | src/client/qwaylandwindow_p.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 23e736608..dce6590a8 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -76,8 +76,8 @@ QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr; QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display) : QPlatformWindow(window) , mDisplay(display) - , mResizeAfterSwap(qEnvironmentVariableIsSet("QT_WAYLAND_RESIZE_AFTER_SWAP")) , mSurfaceLock(QReadWriteLock::Recursive) + , mResizeAfterSwap(qEnvironmentVariableIsSet("QT_WAYLAND_RESIZE_AFTER_SWAP")) { { bool ok; diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 8fcbc4dcc..102db1b43 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -253,7 +253,11 @@ protected: QMargins clientSideMargins() const; QWaylandDisplay *mDisplay = nullptr; + + // mSurface can be written by the main thread. Other threads should claim a read lock for access + mutable QReadWriteLock mSurfaceLock; QScopedPointer<QWaylandSurface> mSurface; + QWaylandShellSurface *mShellSurface = nullptr; QWaylandSubSurface *mSubSurfaceWindow = nullptr; QList<QWaylandSubSurface *> mChildren; @@ -343,8 +347,6 @@ private: static QWaylandWindow *mMouseGrab; - mutable QReadWriteLock mSurfaceLock; - friend class QWaylandSubSurface; }; |