summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-03-03 16:01:01 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-03-04 06:17:48 (GMT)
commit6daa12f8bcc16947a059747ebd985934163068eb (patch)
tree7202cb2c00d5ee6ea9efc4079191b17b15377606 /src
parent85b3a869fd69cfe14d05edd1fd17f913ba73dd52 (diff)
downloadQt-6daa12f8bcc16947a059747ebd985934163068eb.zip
Qt-6daa12f8bcc16947a059747ebd985934163068eb.tar.gz
Qt-6daa12f8bcc16947a059747ebd985934163068eb.tar.bz2
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')
-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 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,