summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2022-08-08 03:41:59 +0400
committerIlya Fedin <fedin-ilja2010@ya.ru>2022-09-20 15:31:06 +0400
commit5bbe3ca7e0f437313718880ee7c61d4991c6d61c (patch)
treec983855a1cdac5215afd35256831e04c70ba34c4
parent06cd8f98dedcef2809cf5f9fd09f163a77761dfd (diff)
downloadqtwayland-5bbe3ca7e0f437313718880ee7c61d4991c6d61c.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) Pick-to: 6.4 6.3 Change-Id: I7cde12ea5548d59810e2631be2a0085f86d5c4b9 Reviewed-by: David Edmundson <davidedmundson@kde.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;