diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index 9d4bf1f04f..111695e7b2 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -435,6 +435,10 @@ void InternalWindowTest::testKeyboardTriggersLeave() kwinApp()->platform()->keyboardKeyPressed(KEY_A, timestamp++); QVERIFY(enteredSpy.wait()); kwinApp()->platform()->keyboardKeyReleased(KEY_A, timestamp++); + + // Destroy the test client. + shellSurface.reset(); + QVERIFY(Test::waitForWindowDestroyed(c)); } void InternalWindowTest::testTouch()