aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2018-11-16 11:59:28 +0000
committerDavid Edmundson <[email protected]>2018-11-16 11:59:28 +0000
commit2e42f4c1a3684337ec1299132777d67aa9c10f64 (patch)
tree9ff8499fb538385073b24d87a1821cfd383ff3d3
parent80da18a143f1b57751e77f9574212ff60ff14950 (diff)
[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
-rw-r--r--shell_client.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell_client.cpp b/shell_client.cpp
index 83e58ee..f6b9530 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);