From e043f2262f8ce6456a6cd36e8e5f46f2961fa77f Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 8 Mar 2022 12:53:02 +0100 Subject: [PATCH] inputmethod: Fix the test We should account for keyboards that are not full screen (unlike maliit). It shouldn't make a difference for maliit. --- autotests/integration/inputmethod_test.cpp | 2 +- src/inputpanelv1client.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index 79bdd2961f..217b962cef 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -154,7 +154,7 @@ void InputMethodTest::testOpenClose() Test::render(surface.data(), toplevelConfigureRequestedSpy.last().first().value(), Qt::red); QVERIFY(frameGeometryChangedSpy.wait()); - QCOMPARE(client->frameGeometry().height(), 1024 - keyboardClient->inputGeometry().height() + 1); + QCOMPARE(client->frameGeometry().height(), 1024 - keyboardClient->inputGeometry().height()); // Hide the keyboard textInput->hideInputPanel(); diff --git a/src/inputpanelv1client.cpp b/src/inputpanelv1client.cpp index fafc6d1019..477eeabb50 100644 --- a/src/inputpanelv1client.cpp +++ b/src/inputpanelv1client.cpp @@ -96,7 +96,7 @@ void KWin::InputPanelV1Client::reposition() panelSize = panelSize.boundedTo(availableArea.size()); - QRect geo(availableArea.topLeft(), panelSize); + QRect geo(availableArea.bottomLeft() - QPoint{0, panelSize.height()}, panelSize); geo.translate((availableArea.width() - panelSize.width())/2, availableArea.height() - outputArea.height()); moveResize(geo); } break;