summaryrefslogtreecommitdiff
path: root/src/client/qwaylandwindow_p.h
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2022-02-03 14:27:56 +0000
committerDavid Edmundson <davidedmundson@kde.org>2022-03-22 16:09:48 +0000
commit4aa3fb31e3dc5d93212bc459f05a8acd50cf6ade (patch)
treefcf95e1e6661d7fe7698bd3dd152f5d5b5737f77 /src/client/qwaylandwindow_p.h
parenteaaa8b6242cc2926193932dd47843dee2c19ec65 (diff)
downloadqtwayland-4aa3fb31e3dc5d93212bc459f05a8acd50cf6ade.tar.gz
Client: Fix up thread usage for mSurface
It didn't make sense that mSurface was protected, but the mutex was not. Also try to improve documentation. Change-Id: I2f59557cccbb2d6f0b2772ce3c8a2dab01167a6c Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r--src/client/qwaylandwindow_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 8fcbc4dc..102db1b4 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;
};