summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2013-04-19 09:28:43 +0200
committerSamuel Rødal <samuel.rodal@digia.com>2013-04-23 14:19:04 +0200
commit279eecadaead90a16c5603aa35353f027faca295 (patch)
tree4a30bc6186f83ec40f857e8fe30bd4724a34befc /src
parent697c2f23126c076fc6ef1805f1f957472bbfa388 (diff)
downloadqtwayland-279eecadaead90a16c5603aa35353f027faca295.tar.gz
Fixed hellowindow with multiple windows in xcomposite-egl.
Multiple contexts are calling blockingReadEvents() from multiple threads, while the window belongs to one thread. So the mWaitingForFrameSync might get set to false by another thread while the current thread is stuck in blockingReadEvents(). This leads to animating blocking until something else puts events on the wayland event queue, for example mouse move events. Change-Id: Id76a82e500753c5817d25298662851c4a6505553 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindow.cpp3
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindow.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
index cdfef320..d24d2e67 100644
--- a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
@@ -308,8 +308,11 @@ void QWaylandWindow::frameCallback(void *data, struct wl_callback *callback, uin
}
}
+QMutex QWaylandWindow::mFrameSyncMutex;
+
void QWaylandWindow::waitForFrameSync()
{
+ QMutexLocker locker(&mFrameSyncMutex);
if (!mWaitingForFrameSync)
return;
mDisplay->flushRequests();
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindow.h b/src/plugins/platforms/wayland_common/qwaylandwindow.h
index b90af1f6..a80b3c75 100644
--- a/src/plugins/platforms/wayland_common/qwaylandwindow.h
+++ b/src/plugins/platforms/wayland_common/qwaylandwindow.h
@@ -199,6 +199,7 @@ private:
static const wl_callback_listener callbackListener;
static void frameCallback(void *data, struct wl_callback *wl_callback, uint32_t time);
+ static QMutex mFrameSyncMutex;
};
inline QIcon QWaylandWindow::windowIcon() const