diff options
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylanddisplay.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylanddisplay.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index ca0e6572c..588096933 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -142,6 +142,13 @@ QWaylandDisplay::QWaylandDisplay(void) wl_display_add_global_listener(mDisplay, QWaylandDisplay::displayHandleGlobal, this); + mFd = wl_display_get_fd(mDisplay, sourceUpdate, this); + QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher; + connect(dispatcher, SIGNAL(aboutToBlock()), this, SLOT(flushRequests())); + + mReadNotifier = new QSocketNotifier(mFd, QSocketNotifier::Read, this); + connect(mReadNotifier, SIGNAL(activated(int)), this, SLOT(readEvents())); + #ifdef QT_WAYLAND_GL_SUPPORT mEglIntegration = QWaylandGLIntegration::createGLIntegration(this); #endif @@ -156,16 +163,6 @@ QWaylandDisplay::QWaylandDisplay(void) mEglIntegration->initialize(); #endif - mFd = wl_display_get_fd(mDisplay, sourceUpdate, this); -} - -void QWaylandDisplay::eventDispatcherCreated(QAbstractEventDispatcher *dispatcher) -{ - connect(dispatcher, SIGNAL(aboutToBlock()), this, SLOT(flushRequests())); - - mReadNotifier = new QSocketNotifier(mFd, QSocketNotifier::Read, this); - connect(mReadNotifier, SIGNAL(activated(int)), this, SLOT(readEvents())); - waitForScreens(); } |