From 6daa12f8bcc16947a059747ebd985934163068eb Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 3 Mar 2011 17:01:01 +0100 Subject: Lighthouse: Fix a block for wayland with gl support The initialial readable iteration, needs to be done before initializing egl, or it will be done inside egl. The readable iteration after initialzing egl would block forever otherwise. --- src/plugins/platforms/wayland/qwaylanddisplay.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index c3e87a1..d0a0725 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -185,7 +185,13 @@ QWaylandDisplay::QWaylandDisplay(void) #ifdef QT_WAYLAND_GL_SUPPORT mNativeEglDisplay = wl_egl_display_create(mDisplay); +#else + mNativeEglDisplay = 0; +#endif + + eventDispatcher(); +#ifdef QT_WAYLAND_GL_SUPPORT mEglDisplay = eglGetDisplay((EGLNativeDisplayType)mNativeEglDisplay); if (mEglDisplay == NULL) { qWarning("EGL not available"); @@ -196,12 +202,9 @@ QWaylandDisplay::QWaylandDisplay(void) } } #else - mNativeEglDisplay = 0; mEglDisplay = 0; #endif - eventDispatcher(); - int fd = wl_display_get_fd(mDisplay, sourceUpdate, this); mReadNotifier = new QSocketNotifier(fd, QSocketNotifier::Read, this); connect(mReadNotifier, -- cgit v0.12