diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-15 09:07:48 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-15 09:07:48 +0200 |
commit | b3eba26e6f1de63b1de39e1895eb081b45250325 (patch) | |
tree | 55dea47c2ed0fd261ce76031aebd7123e236a125 /src/client/qwaylanddisplay.cpp | |
parent | a64dcb7416fd5c0100ad176adf26f30b826cbfd6 (diff) | |
parent | a727ee0b2f1044ad8d5689208aed3f469b8de1ba (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
src/client/qwaylandintegration.cpp
Change-Id: I29120f06d33c2d383a41cf35ca4a59f5d8548ad7
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 0dd7bdfa6..ccd189477 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -154,12 +154,7 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) mEventThreadObject->displayConnect(); mDisplay = mEventThreadObject->display(); //blocks until display is available - //Create a new even queue for the QtGui thread - mEventQueue = wl_display_create_queue(mDisplay); - struct ::wl_registry *registry = wl_display_get_registry(mDisplay); - wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue); - init(registry); connect(mEventThreadObject, SIGNAL(newEventsRead()), this, SLOT(flushRequests())); @@ -187,7 +182,7 @@ QWaylandDisplay::~QWaylandDisplay(void) void QWaylandDisplay::flushRequests() { - if (wl_display_dispatch_queue_pending(mDisplay, mEventQueue) < 0) { + if (wl_display_dispatch_pending(mDisplay) < 0) { mEventThreadObject->checkError(); exitWithError(); } @@ -198,7 +193,7 @@ void QWaylandDisplay::flushRequests() void QWaylandDisplay::blockingReadEvents() { - if (wl_display_dispatch_queue(mDisplay, mEventQueue) < 0) { + if (wl_display_dispatch(mDisplay) < 0) { mEventThreadObject->checkError(); exitWithError(); } @@ -206,6 +201,8 @@ void QWaylandDisplay::blockingReadEvents() void QWaylandDisplay::exitWithError() { + mEventThread->quit(); + mEventThread->wait(); ::exit(1); } @@ -348,17 +345,16 @@ void QWaylandDisplay::forceRoundTrip() int ret = 0; bool done = false; wl_callback *callback = wl_display_sync(mDisplay); - 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); + ret = wl_display_dispatch_pending(mDisplay); } } else { while (!done && ret >= 0) - ret = wl_display_dispatch_queue(mDisplay, mEventQueue); + ret = wl_display_dispatch(mDisplay); } if (ret == -1 && !done) |