diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-03-03 16:01:01 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-03-04 06:17:48 (GMT) |
commit | 6daa12f8bcc16947a059747ebd985934163068eb (patch) | |
tree | 7202cb2c00d5ee6ea9efc4079191b17b15377606 /src | |
parent | 85b3a869fd69cfe14d05edd1fd17f913ba73dd52 (diff) | |
download | Qt-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.cpp | 9 |
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, |