summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2022-08-08 03:41:59 +0400
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-20 15:25:57 +0000
commita8a75edadba424498749a9cb42d3c18ff117994a (patch)
tree080fd542362c864be41d37895f75abd98d919d62
parentd612c9d11d65d96ef6a17e931e87ea2272476f5d (diff)
downloadqtwayland-a8a75edadba424498749a9cb42d3c18ff117994a.tar.gz
Client: fix enlargening window position by margins size
In d89c8920f3b82dd2098971b5a66c4b9c75da5af0 it was changed to sum the current geometry with the margins. This makes Qt thinking that the window is moving on every configure request and makes the previous fix (5f8db38e49b5bee4962fa9ac048c23a3faae587b) actually no-op I'm not sure why it was changed as the commit is squashed, but I hope the intention wasn't to make Qt think the window is endlessly moving (exactly that happened though) Change-Id: I7cde12ea5548d59810e2631be2a0085f86d5c4b9 Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit 5bbe3ca7e0f437313718880ee7c61d4991c6d61c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandwindow.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 9c6ce91a..001f99d0 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -412,8 +412,7 @@ void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, cons
int widthWithoutMargins = qMax(sizeWithMargins.width() - (margins.left() + margins.right()), 1);
int heightWithoutMargins = qMax(sizeWithMargins.height() - (margins.top() + margins.bottom()), 1);
- QRect geometry(windowGeometry().topLeft() + QPoint(margins.left(), margins.top()),
- QSize(widthWithoutMargins, heightWithoutMargins));
+ QRect geometry(windowGeometry().topLeft(), QSize(widthWithoutMargins, heightWithoutMargins));
mOffset += offset;
mInResizeFromApplyConfigure = true;