diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-08-05 18:12:03 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-08-21 10:55:19 (GMT) |
commit | fb2296e84379b03176a52527ec956cd9b34dc058 (patch) | |
tree | b2c0495b211d26968298d5585fd998e00db8f3a4 /src/opengl/qgl.cpp | |
parent | c2688467c1b9b3543627a7fbb2382a95580b2f8a (diff) | |
download | Qt-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.cpp | 7 |
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); |