Commit f70a2c79 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Rodney Dawes
Browse files

inputmethod: fix placing the virtual keyboard at the bottom

We should use the output area as the margin size as where to position
rather than the panelSize.

This ensures that the keyboard ends up in the right place right above
the panels.


(cherry picked from commit 4c9c5f9f)
parent bac4f4ed
Pipeline #141873 passed with stage
in 15 minutes and 22 seconds
......@@ -81,22 +81,24 @@ void KWin::InputPanelV1Client::reposition()
}
QRect availableArea;
QRect outputArea;
if (m_output) {
outputArea = m_output->geometry();
if (waylandServer()->isScreenLocked()) {
availableArea = m_output->geometry();
availableArea = outputArea;
} else {
availableArea = workspace()->clientArea(MaximizeArea, this, m_output);
}
} else {
availableArea = workspace()->clientArea(MaximizeArea, this);
outputArea = workspace()->clientArea(FullScreenArea, this);
}
panelSize = panelSize.boundedTo(availableArea.size());
QRect geo(availableArea.topLeft(), panelSize);
geo.translate((availableArea.width() - panelSize.width())/2, availableArea.height() - panelSize.height());
geo.translate((availableArea.width() - panelSize.width())/2, availableArea.height() - outputArea.height());
moveResize(geo);
} break;
case Overlay: {
auto textInputSurface = waylandServer()->seat()->focusedTextInputSurface();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment