diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index 72957a27e2..f67da3faaa 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -538,11 +538,11 @@ void InternalWindowTest::testMove() // normal move should be synced internalClient->move(5, 10); QCOMPARE(internalClient->geometry(), QRect(5, 10, 100, 100)); - QCOMPARE(win.geometry(), QRect(5, 10, 100, 100)); + QTRY_COMPARE(win.geometry(), QRect(5, 10, 100, 100)); // another move should also be synced internalClient->move(10, 20); QCOMPARE(internalClient->geometry(), QRect(10, 20, 100, 100)); - QCOMPARE(win.geometry(), QRect(10, 20, 100, 100)); + QTRY_COMPARE(win.geometry(), QRect(10, 20, 100, 100)); // now move with a Geometry update blocker { @@ -552,7 +552,7 @@ void InternalWindowTest::testMove() QCOMPARE(win.geometry(), QRect(10, 20, 100, 100)); } // after destroying the blocker it should be synced - QCOMPARE(win.geometry(), QRect(5, 10, 100, 100)); + QTRY_COMPARE(win.geometry(), QRect(5, 10, 100, 100)); } void InternalWindowTest::testSkipCloseAnimation_data() diff --git a/shell_client.cpp b/shell_client.cpp index e4b169e677..c72105ceb0 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -543,7 +543,8 @@ void ShellClient::syncGeometryToInternalWindow() const QRect windowRect = QRect(geom.topLeft() + QPoint(borderLeft(), borderTop()), geom.size() - QSize(borderLeft() + borderRight(), borderTop() + borderBottom())); if (m_internalWindow->geometry() != windowRect) { - m_internalWindow->setGeometry(windowRect); + // delay to end of cycle to prevent freeze, see BUG 384441 + QTimer::singleShot(0, m_internalWindow, std::bind(static_cast(&QWindow::setGeometry), m_internalWindow, windowRect)); } }