From a9ccfba768a93a79c4b0baef67e6874cad281bff Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 18 Oct 2021 15:41:05 +0200 Subject: [PATCH] Fix inputmethodtest We needed to simulate a touch event so that it doesn't decide to ignore the next events. --- autotests/integration/inputmethod_test.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index 4df74edf46..5a7af44b28 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -57,6 +57,13 @@ private Q_SLOTS: void testEnableActive(); void testHidePanel(); void testSwitchFocusedSurfaces(); + +private: + void touchNow() { + static int time = 0; + kwinApp()->platform()->touchDown(0, {100, 100}, ++time); + kwinApp()->platform()->touchUp(0, ++time); + } }; @@ -87,6 +94,7 @@ void InputMethodTest::initTestCase() void InputMethodTest::init() { + touchNow(); QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat | Test::AdditionalWaylandInterface::TextInputManagerV2 | Test::AdditionalWaylandInterface::InputMethodV1 | @@ -129,6 +137,7 @@ void InputMethodTest::testOpenClose() QVERIFY(surfaceConfigureRequestedSpy.wait()); // Show the keyboard + touchNow(); textInput->showInputPanel(); QVERIFY(clientAddedSpy.wait());