summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-03-03 17:01:01 +0100
committerJørgen Lind <jorgen.lind@nokia.com>2011-03-04 07:17:48 +0100
commit6daa12f8bcc16947a059747ebd985934163068eb (patch)
tree7202cb2c00d5ee6ea9efc4079191b17b15377606 /src/plugins
parent85b3a869fd69cfe14d05edd1fd17f913ba73dd52 (diff)
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.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
index c3e87a11c3..d0a0725bef 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,