From 2e42f4c1a3684337ec1299132777d67aa9c10f64 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 16 Nov 2018 11:59:28 +0000 Subject: [PATCH] [wayland] Fix ShellClient removing borders to give the same window geometry Summary: In the case of going from maximised to fullscreen when decorated the geometry of the window (as far as kwin is concerned) could remain static if we have no panels, but we still need a newly resized buffer from the client. When checking if we need a new buffer or to perform the geometry change directly we need to compare the client size without borders. Test Plan: maximizedToFullScreen unit test Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16920 --- shell_client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell_client.cpp b/shell_client.cpp index 83e58eef2b..f6b9530ccd 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -604,7 +604,8 @@ void ShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) geom = geometryBeforeUpdateBlocking(); } // TODO: better merge with Client's implementation - if (QSize(w, h) == geom.size() && !isWaitingForMoveResizeSync()) { + const QSize requestedClientSize = QSize(w, h) - QSize(borderLeft() + borderRight(), borderTop() + borderBottom()); + if (requestedClientSize == m_clientSize && !isWaitingForMoveResizeSync()) { // size didn't change, update directly doSetGeometry(QRect(x, y, w, h)); updateMaximizeMode(m_requestedMaximizeMode);