path: root/src/opengl/qgl.cpp
diff options
authorSamuel Rødal <>2012-03-14 17:55:43 +0100
committerQt by Nokia <>2012-03-22 11:43:36 +0100
commit55fa3c189f88933d390177ad5606d3de9deacf93 (patch)
treea8c96bead830fa88de6bee2783b6eba3591bb014 /src/opengl/qgl.cpp
parent9c7cdce672df7da5c84b0ae6ca10ff09a670a315 (diff)
Got rid of Map / Unmap events in favor of Expose event.
Since change 2e4d8f67a871f2033 the need for Map and Unmap events has gone away, as now the Expose event is used to notify the application about when it can start rendering. The Map and Unmap events weren't really used except by QWidget to set the WA_Mapped flag, which we now set based on the expose / unexpose. Also guarantee that a Resize event is always sent before the first Expose, by re-introducing an asynchronous expose event handler. Since an expose is required before rendering to a QWindow, show a warning if QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a window that has not received its first expose. Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4 Reviewed-by: Friedemann Kleint <>
Diffstat (limited to 'src/opengl/qgl.cpp')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index eb27e865b5..2c683f7ae7 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -3770,7 +3770,7 @@ void QGLWidget::setFormat(const QGLFormat &format)
void QGLWidget::updateGL()
- if (updatesEnabled())
+ if (updatesEnabled() && testAttribute(Qt::WA_Mapped))