diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index 504d1a3484..acd390cb58 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -129,19 +129,18 @@ void InputMethodTest::testOpenClose() QSignalSpy frameGeometryChangedSpy(window, &Window::frameGeometryChanged); QSignalSpy toplevelConfigureRequestedSpy(shellSurface.get(), &Test::XdgToplevel::configureRequested); QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested); + QVERIFY(surfaceConfigureRequestedSpy.wait()); std::unique_ptr textInput(Test::waylandTextInputManager()->createTextInput(Test::waylandSeat())); - QVERIFY(textInput != nullptr); - textInput->enable(surface.get()); - QVERIFY(surfaceConfigureRequestedSpy.wait()); // Show the keyboard touchNow(); - QSignalSpy paneladded(kwinApp()->inputMethod(), &KWin::InputMethod::panelChanged); - QVERIFY(paneladded.wait()); + textInput->enable(surface.get()); textInput->showInputPanel(); + QSignalSpy paneladded(kwinApp()->inputMethod(), &KWin::InputMethod::panelChanged); QVERIFY(windowAddedSpy.wait()); + QCOMPARE(paneladded.count(), 1); Window *keyboardClient = windowAddedSpy.last().first().value(); QVERIFY(keyboardClient); @@ -164,6 +163,14 @@ void InputMethodTest::testOpenClose() QCOMPARE(window->frameGeometry().height(), 1024); + // show the keyboard again + touchNow(); + textInput->enable(surface.get()); + textInput->showInputPanel(); + + QVERIFY(surfaceConfigureRequestedSpy.wait()); + QVERIFY(keyboardClient->isShown()); + // Destroy the test window. shellSurface.reset(); QVERIFY(Test::waitForWindowDestroyed(window));