diff options
authorDavid Edmundson <>2018-09-30 11:30:18 +0300
committerDavid Edmundson <>2018-10-03 08:37:49 +0000
commit5f8db38e49b5bee4962fa9ac048c23a3faae587b (patch)
parentcfdb5926d3c98bf0d759acdf2a4f1fd738f39b9c (diff)
Avoid spurious move events after configure call
Whilst wayland can't actually move the window in a QWindow::setGeometry call the previous behavior was to keep it so that it appeared to the client that it had moved. The new behavior is non-consistent, QWindow::setPosition will update QWindow::position until the first configure call is received at which point it will move back to 0,0. This then generates a QMoveEvent for the window that hasn't moved. This patch keeps the QWindow::position consistent with the user request and doesn't generate move events. Change-Id: Ifb1433b3902d44c1b2e43036bc1805a6e00128fb Reviewed-by: Johan Helsing <>
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index cc69fac9..52bee6ae 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -345,7 +345,7 @@ void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, cons
QMargins margins = frameMargins();
int widthWithoutMargins = qMax(sizeWithMargins.width() - (margins.left()+margins.right()), 1);
int heightWithoutMargins = qMax(sizeWithMargins.height() - (, 1);
- QRect geometry(QPoint(), QSize(widthWithoutMargins, heightWithoutMargins));
+ QRect geometry(windowGeometry().topLeft(), QSize(widthWithoutMargins, heightWithoutMargins));
mOffset += offset;