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.
This commit is contained in:
parent
cf6cc51651
commit
4c9c5f9fd5
1 changed files with 5 additions and 3 deletions
|
@ -81,22 +81,24 @@ void KWin::InputPanelV1Client::reposition()
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect availableArea;
|
QRect availableArea;
|
||||||
|
QRect outputArea;
|
||||||
if (m_output) {
|
if (m_output) {
|
||||||
|
outputArea = m_output->geometry();
|
||||||
if (waylandServer()->isScreenLocked()) {
|
if (waylandServer()->isScreenLocked()) {
|
||||||
availableArea = m_output->geometry();
|
availableArea = outputArea;
|
||||||
} else {
|
} else {
|
||||||
availableArea = workspace()->clientArea(MaximizeArea, this, m_output);
|
availableArea = workspace()->clientArea(MaximizeArea, this, m_output);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
availableArea = workspace()->clientArea(MaximizeArea, this);
|
availableArea = workspace()->clientArea(MaximizeArea, this);
|
||||||
|
outputArea = workspace()->clientArea(FullScreenArea, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
panelSize = panelSize.boundedTo(availableArea.size());
|
panelSize = panelSize.boundedTo(availableArea.size());
|
||||||
|
|
||||||
QRect geo(availableArea.topLeft(), panelSize);
|
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);
|
moveResize(geo);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case Overlay: {
|
case Overlay: {
|
||||||
auto textInputSurface = waylandServer()->seat()->focusedTextInputSurface();
|
auto textInputSurface = waylandServer()->seat()->focusedTextInputSurface();
|
||||||
|
|
Loading…
Reference in a new issue