Fix a crash when minimizing a QQuickWindow.
Send empty expose event and flush queue when minimizing. Task-number: QTBUG-28439 Task-number: QTBUG-26424 Change-Id: I2e921a86660f946ced7af735cdf197fb666e2934 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
d6506c129d
commit
aacf4d0263
@ -1260,6 +1260,10 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowState state)
|
|||||||
setFlag(FrameDirty);
|
setFlag(FrameDirty);
|
||||||
m_windowState = state;
|
m_windowState = state;
|
||||||
QWindowSystemInterface::handleWindowStateChanged(window(), state);
|
QWindowSystemInterface::handleWindowStateChanged(window(), state);
|
||||||
|
if (state == Qt::WindowMinimized) {
|
||||||
|
handleHidden();
|
||||||
|
QWindowSystemInterface::flushWindowSystemEvents(); // Tell QQuickWindow to stop rendering now.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWindowsWindow::setWindowState(Qt::WindowState state)
|
void QWindowsWindow::setWindowState(Qt::WindowState state)
|
||||||
|
@ -2043,8 +2043,6 @@ void tst_QWidget::showFullScreen()
|
|||||||
QVERIFY(layouted.isFullScreen());
|
QVERIFY(layouted.isFullScreen());
|
||||||
|
|
||||||
layouted.showFullScreen();
|
layouted.showFullScreen();
|
||||||
if (m_platform == QStringLiteral("windows"))
|
|
||||||
QEXPECT_FAIL("", "QTBUG-26424", Continue);
|
|
||||||
QVERIFY(!layouted.isMinimized());
|
QVERIFY(!layouted.isMinimized());
|
||||||
QVERIFY(layouted.isFullScreen());
|
QVERIFY(layouted.isFullScreen());
|
||||||
QVERIFY(layouted.isVisible());
|
QVERIFY(layouted.isVisible());
|
||||||
@ -7115,8 +7113,6 @@ void tst_QWidget::updateWhileMinimized()
|
|||||||
// Make sure update requests are discarded until the widget is shown again.
|
// Make sure update requests are discarded until the widget is shown again.
|
||||||
widget.update(0, 0, 50, 50);
|
widget.update(0, 0, 50, 50);
|
||||||
QTest::qWait(10);
|
QTest::qWait(10);
|
||||||
if (m_platform == QStringLiteral("windows"))
|
|
||||||
QEXPECT_FAIL("", "QTBUG-26424", Continue);
|
|
||||||
QCOMPARE(widget.numPaintEvents, 0);
|
QCOMPARE(widget.numPaintEvents, 0);
|
||||||
|
|
||||||
// Restore window.
|
// Restore window.
|
||||||
|
@ -508,7 +508,6 @@ void tst_QMdiArea::subWindowActivated2()
|
|||||||
if (!macHasAccessToWindowsServer())
|
if (!macHasAccessToWindowsServer())
|
||||||
QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort);
|
QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort);
|
||||||
#endif
|
#endif
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(&mdiArea));
|
|
||||||
#ifdef Q_OS_WINCE
|
#ifdef Q_OS_WINCE
|
||||||
QSKIP("Not fixed yet. See Task 197453");
|
QSKIP("Not fixed yet. See Task 197453");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user