diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'tests/auto/gui/kernel/qwindow/tst_qwindow.cpp')
-rw-r--r-- | tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 7c24bbaadd..9415908383 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -29,6 +29,7 @@ #include <qrasterwindow.h> #include <qpa/qwindowsysteminterface.h> #include <qpa/qplatformintegration.h> +#include <qpa/qplatformwindow.h> #include <private/qguiapplication_p.h> #include <private/qhighdpiscaling_p.h> #include <QtGui/QPainter> @@ -114,6 +115,7 @@ private slots: void cleanup(); void testBlockingWindowShownAfterModalDialog(); void generatedMouseMove(); + void keepPendingUpdateRequests(); private: QPoint m_availableTopLeft; @@ -2451,6 +2453,27 @@ void tst_QWindow::generatedMouseMove() QVERIFY(w.mouseMovedCount == 5); } +void tst_QWindow::keepPendingUpdateRequests() +{ + QRect geometry(m_availableTopLeft + QPoint(80, 80), m_testWindowSize); + + Window window; + window.setGeometry(geometry); + window.show(); + QCoreApplication::processEvents(); + QTRY_VERIFY(window.isExposed()); + + window.requestUpdate(); + window.close(); + window.setVisible(true); + + QPlatformWindow *platformWindow = window.handle(); + QVERIFY(platformWindow); + + QVERIFY(platformWindow->hasPendingUpdateRequest()); + QTRY_VERIFY(!platformWindow->hasPendingUpdateRequest()); +} + #include <tst_qwindow.moc> QTEST_MAIN(tst_QWindow) |