diff --git a/autotests/integration/effects/toplevel_open_close_animation_test.cpp b/autotests/integration/effects/toplevel_open_close_animation_test.cpp --- a/autotests/integration/effects/toplevel_open_close_animation_test.cpp +++ b/autotests/integration/effects/toplevel_open_close_animation_test.cpp @@ -208,6 +208,10 @@ popupSurface.reset(); QVERIFY(popupClosedSpy.wait()); QVERIFY(!effect->isActive()); + + // Destroy the main window. + mainWindowSurface.reset(); + QVERIFY(Test::waitForWindowDestroyed(mainWindow)); } WAYLANDTEST_MAIN(ToplevelOpenCloseAnimationTest)