diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2012-03-14 17:55:43 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-22 11:43:36 +0100 |
commit | 55fa3c189f88933d390177ad5606d3de9deacf93 (patch) | |
tree | a8c96bead830fa88de6bee2783b6eba3591bb014 /src/gui/kernel/qwindow_p.h | |
parent | 9c7cdce672df7da5c84b0ae6ca10ff09a670a315 (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 <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 7f3958b3ff..03b3b92a25 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -72,8 +72,10 @@ public: , parentWindow(0) , platformWindow(0) , visible(false) + , exposed(false) , windowState(Qt::WindowNoState) , resizeEventPending(true) + , receivedExpose(false) , positionPolicy(WindowFrameExclusive) , contentOrientation(Qt::PrimaryOrientation) , windowOrientation(Qt::PrimaryOrientation) @@ -99,17 +101,18 @@ public: return offset; } - QWindow::SurfaceType surfaceType; Qt::WindowFlags windowFlags; QWindow *parentWindow; QPlatformWindow *platformWindow; bool visible; + bool exposed; QSurfaceFormat requestedFormat; QString windowTitle; QRect geometry; Qt::WindowState windowState; bool resizeEventPending; + bool receivedExpose; PositionPolicy positionPolicy; Qt::ScreenOrientation contentOrientation; Qt::ScreenOrientation windowOrientation; |