Merge remote-tracking branch 'origin/5.4' into 5.5

Change-Id: I03fd08fc0576ffac813f64905c23de4d65e67433
This commit is contained in:
Frederik Gladhorn 2015-02-20 15:38:53 +01:00
commit 30b55342fc

View File

@ -344,8 +344,15 @@ void QWaylandDisplay::forceRoundTrip()
wl_proxy_set_queue((struct wl_proxy *)callback, mEventQueue);
wl_callback_add_listener(callback, &sync_listener, &done);
flushRequests();
if (QThread::currentThread()->eventDispatcher()) {
while (!done && ret >= 0) {
QThread::currentThread()->eventDispatcher()->processEvents(QEventLoop::WaitForMoreEvents);
ret = wl_display_dispatch_queue_pending(mDisplay, mEventQueue);
}
} else {
while (!done && ret >= 0)
ret = wl_display_dispatch_queue(mDisplay, mEventQueue);
}
if (ret == -1 && !done)
wl_callback_destroy(callback);