summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformwindow_qpa.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-03-14 17:55:43 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-22 11:43:36 +0100
commit55fa3c189f88933d390177ad5606d3de9deacf93 (patch)
treea8c96bead830fa88de6bee2783b6eba3591bb014 /src/gui/kernel/qplatformwindow_qpa.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 <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
index e12228d7bd..c8e2776366 100644
--- a/src/gui/kernel/qplatformwindow_qpa.cpp
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -142,11 +142,13 @@ QMargins QPlatformWindow::frameMargins() const
/*!
Reimplemented in subclasses to show the surface
if \a visible is \c true, and hide it if \a visible is \c false.
+
+ The default implementation sends a synchronous expose event.
*/
void QPlatformWindow::setVisible(bool visible)
{
- Q_UNUSED(visible);
- QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size()));
+ QRect rect(QPoint(), geometry().size());
+ QWindowSystemInterface::handleSynchronousExposeEvent(window(), rect);
}
/*!
Requests setting the window flags of this surface