summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-08-05 18:12:03 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-08-21 10:55:19 (GMT)
commitfb2296e84379b03176a52527ec956cd9b34dc058 (patch)
treeb2c0495b211d26968298d5585fd998e00db8f3a4 /src/opengl/qgl.cpp
parentc2688467c1b9b3543627a7fbb2382a95580b2f8a (diff)
downloadQt-fb2296e84379b03176a52527ec956cd9b34dc058.zip
Qt-fb2296e84379b03176a52527ec956cd9b34dc058.tar.gz
Qt-fb2296e84379b03176a52527ec956cd9b34dc058.tar.bz2
Fix QGLWidget::showFullScreen() on X11/EGL
It seems the winId can change during a WindowStateChange event too. Reviewed-By: Trustme
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index af807dd..d3c0bf1 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -3373,12 +3373,15 @@ bool QGLWidget::event(QEvent *e)
setContext(new QGLContext(d->glcx->requestedFormat(), this));
// ### recreating the overlay isn't supported atm
}
+ }
+
#if defined(QT_OPENGL_ES)
- // The window may have been re-created during re-parent - if so, the EGL
+ if ((e->type() == QEvent::ParentChange) || (e->type() == QEvent::WindowStateChange)) {
+ // The window may have been re-created during re-parent or state change - if so, the EGL
// surface will need to be re-created.
d->recreateEglSurface(false);
-#endif
}
+#endif
#elif defined(Q_WS_WIN)
if (e->type() == QEvent::ParentChange) {
QGLContext *newContext = new QGLContext(d->glcx->requestedFormat(), this);