From 050c6ae76b28fda86ac7c8f396dc407f40e36cdc Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 10 Sep 2021 15:23:58 +0200 Subject: [PATCH] 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 --- src/abstract_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp index 39910830e5..e5c72d948f 100644 --- a/src/abstract_client.cpp +++ b/src/abstract_client.cpp @@ -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()));