From 56db60056bb4f45980867848bffc737ce992b70a Mon Sep 17 00:00:00 2001 From: Audun Sutterud Date: Thu, 21 Nov 2024 09:39:06 +0000 Subject: [PATCH] tst_QWindow::framePositioning: Wait for window margins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are set later in openSUSE. Fixes: QTBUG-131368 Change-Id: Ifd27b0b6f94c7d97cbe13acd9741624431dd9906 Reviewed-by: Tor Arne Vestbø --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 2fb33d86bad..9c78d59383b 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -633,6 +633,9 @@ void tst_QWindow::framePositioning() if (showBeforePositioning) { window.showNormal(); QVERIFY(QTest::qWaitForWindowExposed(&window)); + // Needed on OpenSuse. The window manager (KWin) sets the frame margins after exposure. See + // QTBUG-131368. + QVERIFY(QTest::qWaitFor([&window]{ return !window.frameMargins().isNull(); })); originalMargins = window.frameMargins(); window.setFramePosition(screenCenter); } else {