summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
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/plugins/platforms/windows
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/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index fa3661db22..6ff854805c 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -708,7 +708,6 @@ void QWindowsWindow::setVisible(bool visible)
hide_sys();
}
}
- QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size()));
}
bool QWindowsWindow::isVisible() const
@@ -804,12 +803,12 @@ void QWindowsWindow::setParent_sys(const QPlatformWindow *parent) const
void QWindowsWindow::handleShown()
{
- QWindowSystemInterface::handleMapEvent(window());
+ QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), geometry().size()));
}
void QWindowsWindow::handleHidden()
{
- QWindowSystemInterface::handleUnmapEvent(window());
+ QWindowSystemInterface::handleExposeEvent(window(), QRegion());
}
void QWindowsWindow::setGeometry(const QRect &rectIn)