Windows: Send empty region in expose event from setVisible(false).

Fixing a crash in tst_qwidget.cpp, trying to redraw on destroying
the platform window.

Change-Id: I6b6e9a063a1c72dff8110c379f8392605aadbdd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-04-05 16:40:11 +02:00 committed by Qt by Nokia
parent 0174c966f7
commit fddbe8beec

View File

@ -704,11 +704,13 @@ void QWindowsWindow::setVisible(bool visible)
if (m_data.hwnd) {
if (visible) {
show_sys();
QWindowSystemInterface::handleSynchronousExposeEvent(window(),
QRect(QPoint(), geometry().size()));
} else {
hide_sys();
QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRegion());
}
}
QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size()));
}
bool QWindowsWindow::isVisible() const