diff options
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); |