Improve behaviour upon rotation with keyboard on

We make sure our client stays maximised as the screen geometry changes.

Fixes https://invent.kde.org/plasma/plasma-phone-components/-/issues/91
This commit is contained in:
Aleix Pol 2021-09-10 15:23:58 +02:00 committed by Aleix Pol Gonzalez
parent 883dbfda17
commit 050c6ae76b

View file

@ -2654,7 +2654,7 @@ void AbstractClient::setVirtualKeyboardGeometry(const QRect &geo)
}
const QRect availableArea = workspace()->clientArea(MaximizeArea, this);
QRect newWindowGeometry = m_keyboardGeometryRestore;
QRect newWindowGeometry = (maximizeMode() & MaximizeHorizontal) ? availableArea : m_keyboardGeometryRestore;
newWindowGeometry.moveBottom(geo.top());
newWindowGeometry.setTop(qMax(newWindowGeometry.top(), availableArea.top()));