diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-07 13:10:03 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-07 13:10:03 +0200 |
commit | 1006fd8b4b92856c90fdd2d0df257e9b09c3f762 (patch) | |
tree | ecdf51ad3503454494534b02e8cea0364c93bfc7 /src/client/qwaylandwindow.cpp | |
parent | 481cea71043dabf6d5ff33101a66693af86438e1 (diff) | |
parent | 2c9396b063ca03b36e03fbdb85853a410787313d (diff) |
Merge remote-tracking branch 'origin/5.12.5' into 5.12
Change-Id: Ic73262146f51a9e7f4ffab46511654ad70c4f514
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 953582323..fba6cc96c 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -211,7 +211,10 @@ void QWaylandWindow::initWindow() void QWaylandWindow::initializeWlSurface() { Q_ASSERT(!isInitialized()); - init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this))); + { + QWriteLocker lock(&mSurfaceLock); + init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this))); + } emit wlSurfaceCreated(); } @@ -249,6 +252,7 @@ void QWaylandWindow::reset(bool sendDestroyEvent) mSubSurfaceWindow = nullptr; if (isInitialized()) { emit wlSurfaceDestroyed(); + QWriteLocker lock(&mSurfaceLock); destroy(); } mScreens.clear(); @@ -1152,6 +1156,9 @@ void QWaylandWindow::requestUpdate() void QWaylandWindow::handleUpdate() { // TODO: Should sync subsurfaces avoid requesting frame callbacks? + QReadLocker lock(&mSurfaceLock); + if (!isInitialized()) + return; if (mFrameCallback) { wl_callback_destroy(mFrameCallback); |