summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-20 13:44:26 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-20 17:35:45 +0000
commit53f2f2a4b0c7b166e8e7e0950454dd44bc08b253 (patch)
treeddcb9526904dab1e0ba1d2ea1419d3814a34721e
parenta67ce215b26335067b2d433a75df5060c0218eb6 (diff)
QWidgetWindow: Stabilize test on Xcb
Showing, hiding, and showing a window can result in the Xcb QPA plugin warning about qt.qpa.xcb: internal error: void QXcbWindow::setNetWmStateOnUnmappedWindow() called on mapped window The point of the test is to verify that we get a paint event on a window that is shown again after having been hidden, not to verify that async windowing systems can handle a show/hide/show sequence. So wait for the window being exposed before we hide it. Change-Id: If91a9926613645e78e332dacff34bd57e4034b6f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3714e51436eebb64873c58dc36cf89ef8f139f09) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index b11faef30a..586b429338 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -405,6 +405,7 @@ void tst_QWidget_window::tst_paintEventOnSecondShow()
{
PaintTestWidget w;
w.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
w.hide();
w.paintEventCount = 0;