[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
This commit is contained in:
David Edmundson 2018-11-16 11:59:28 +00:00
parent 80da18a143
commit 2e42f4c1a3

View file

@ -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);