From f0b5841b8c332ceef8057809d7e31a887b8e9a94 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Thu, 21 Jul 2022 19:50:54 +0200 Subject: [PATCH] Fix test flaky-crashing on OpenSUSE with KDE window manager Sometimes XCB_EXPOSE event is being propagated twice, once before and once after qWaitForWindowExposed(). But the window has focus only after the second expose event. Changing it to qWaitForWindowActive() fixes the issue. Fixes: QTBUG-104268 Change-Id: Ibc78dd4958ed1a4a8d0967b29d2a53457ab9ae8b Reviewed-by: Volker Hilsheimer Reviewed-by: Shawn Rutledge (cherry picked from commit 60f61198f2308e4767d57ec22331d77d46c6eb44) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp index df4e8bd87df..8deb4589c6c 100644 --- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp @@ -1167,7 +1167,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad() rightWidget.setGeometry(300, 100, 100, 100); touchWidget.show(); - QVERIFY(QTest::qWaitForWindowExposed(&touchWidget)); + QVERIFY(QTest::qWaitForWindowActive(&touchWidget)); const QPointF leftPos = leftWidget.rect().center(); const QPointF rightPos = rightWidget.rect().center();