inputmethod: Fix the test

We should account for keyboards that are not full screen (unlike
maliit). It shouldn't make a difference for maliit.
This commit is contained in:
Aleix Pol 2022-03-08 12:53:02 +01:00 committed by Aleix Pol Gonzalez
parent badf492941
commit e043f2262f
2 changed files with 2 additions and 2 deletions

View file

@ -154,7 +154,7 @@ void InputMethodTest::testOpenClose()
Test::render(surface.data(), toplevelConfigureRequestedSpy.last().first().value<QSize>(), Qt::red); Test::render(surface.data(), toplevelConfigureRequestedSpy.last().first().value<QSize>(), Qt::red);
QVERIFY(frameGeometryChangedSpy.wait()); QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(client->frameGeometry().height(), 1024 - keyboardClient->inputGeometry().height() + 1); QCOMPARE(client->frameGeometry().height(), 1024 - keyboardClient->inputGeometry().height());
// Hide the keyboard // Hide the keyboard
textInput->hideInputPanel(); textInput->hideInputPanel();

View file

@ -96,7 +96,7 @@ void KWin::InputPanelV1Client::reposition()
panelSize = panelSize.boundedTo(availableArea.size()); 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()); geo.translate((availableArea.width() - panelSize.width())/2, availableArea.height() - outputArea.height());
moveResize(geo); moveResize(geo);
} break; } break;