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 {