summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-05-28 08:35:43 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-05-28 11:18:44 (GMT)
commit7ff70350f485f815bbcb2412631b636485ebe37d (patch)
tree66bfc042faf3cd79c0c9d804a16bef078a3a6df0 /src/gui/kernel/qwidget.cpp
parentce5f9bc2a6b1945abdbdc4106be048eb9cbb7102 (diff)
downloadQt-7ff70350f485f815bbcb2412631b636485ebe37d.zip
Qt-7ff70350f485f815bbcb2412631b636485ebe37d.tar.gz
Qt-7ff70350f485f815bbcb2412631b636485ebe37d.tar.bz2
Send ParentChanged event to QGLWidgets when the wId changes on EGL
EGL has window surfaces which are bound to a particular window ID. When that window ID changes, the EGL surface must be re-created. This is achieved by sending the QGLWidget a ParentChanged event. Reviewed-By: Trond
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index d6e5cce..5538c11 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -9203,11 +9203,12 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
d->resolveLayoutDirection();
d->resolveLocale();
- // Note: GL widgets under Windows will always need a ParentChange
- // event to handle recreation/rebinding of the GL context, hence
- // the (f & Qt::MSWindowsOwnDC) clause
+ // Note: GL widgets under WGL or EGL will always need a ParentChange
+ // event to handle recreation/rebinding of the GL context, hence the
+ // (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all
+ // platforms).
if (newParent
-#ifdef Q_WS_WIN
+#if defined(Q_WS_WIN) || defined(QT_OPENGL_ES)
|| (f & Qt::MSWindowsOwnDC)
#endif
) {