diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-06-17 14:48:44 +0300 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-07-06 08:00:02 +0000 |
commit | 8cc88f4854b72bb270e4b701d15ada7bdbb74ff4 (patch) | |
tree | fe7c3ed88fc1d1c469a6e61e104bd12c952b7ab4 /src/client/qwaylandnativeinterface.cpp | |
parent | cc694272c201e57e8bffdb770059e51ac998c5f9 (diff) |
Fix possible race condition leading to a dead lock
It is a bit dangerous to call wl_display_dispatch() in the event thread,
since it may race with the dispatch called e.g. in QWaylandDisplay's
blockingReadEvents() and lead to a dead lock. Instead, use wl_display_prepare_read()
and wl_display_read_events() in the event thread, which doesn't block, and only
dispatch in QWaylandDisplay.
As a result we don't need the additional wayland queue anymore, so remove it.
Change-Id: I9fbbe5d2f38d06773beb7847df1a0212cca92c37
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/client/qwaylandnativeinterface.cpp')
-rw-r--r-- | src/client/qwaylandnativeinterface.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp index 8170c39f1..0d20075f0 100644 --- a/src/client/qwaylandnativeinterface.cpp +++ b/src/client/qwaylandnativeinterface.cpp @@ -58,8 +58,6 @@ void *QWaylandNativeInterface::nativeResourceForIntegration(const QByteArray &re if (lowerCaseResource == "display" || lowerCaseResource == "wl_display" || lowerCaseResource == "nativedisplay") return m_integration->display()->wl_display(); - if (lowerCaseResource == "wl_event_queue") - return m_integration->display()->wl_event_queue(); if (lowerCaseResource == "compositor") return const_cast<wl_compositor *>(m_integration->display()->wl_compositor()); if (lowerCaseResource == "server_buffer_integration") |