tst_QWindow::framePositioning: Wait for window margins

These are set later in openSUSE.

Fixes: QTBUG-131368
Change-Id: Ifd27b0b6f94c7d97cbe13acd9741624431dd9906
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Audun Sutterud 2024-11-21 09:39:06 +00:00
parent 850d4895be
commit 56db60056b

View File

@ -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 {