From 119b00f896703ccf368ef39fd98ba0800dda4be0 Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Fri, 7 May 2021 09:14:55 +0530 Subject: [PATCH] inputmethod: use output geometry for positioning keyboard when locked otherwise it will take the panel strut in account when positioning inputmethod on lockscreen and that will not be positioned correctly. --- src/inputpanelv1client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/inputpanelv1client.cpp b/src/inputpanelv1client.cpp index 0eec81fe0b..1e2ab9d9b6 100644 --- a/src/inputpanelv1client.cpp +++ b/src/inputpanelv1client.cpp @@ -69,7 +69,12 @@ void KWin::InputPanelV1Client::reposition() return; } - const QRect availableArea = workspace()->clientArea(MaximizeArea, m_output, desktop()); + QRect availableArea; + if (waylandServer()->isScreenLocked()) { + availableArea = m_output->geometry(); + } else { + availableArea = workspace()->clientArea(MaximizeArea, m_output, desktop()); + } QRect geo(availableArea.topLeft(), panelSize); geo.translate((availableArea.width() - panelSize.width())/2, availableArea.height() - panelSize.height()); updateGeometry(geo);