summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2024-01-23 11:57:41 +0000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-01-23 14:41:29 +0000
commitde822885f49ca76e681c7f309d5017fcd0e22aeb (patch)
tree11f6a3e219f9718c45b2e25b7ca740a09d48b245
parentc58e53d3fc7b5421726d66dcf1e858c1dbcbcc0c (diff)
Client: Update size hints when updating the decoration
Size hints are in wayland's "window geometry". This includes the space for any client side decoration that QtWayland has to add. We need to update the size hints whenever decoration is created or destroyed and these margins change. Fixes: QTBUG-121399 Change-Id: Ie8c1898859774e1c8dff93695af15327379ad3b6 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 76569162c796be0ac927e04bfe8a6a71809ff7a1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandwindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 672ddc5b1..17e9e3c69 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1118,6 +1118,9 @@ bool QWaylandWindow::createDecoration()
}
setGeometry(geometry());
+ // creating a decoration changes our margins which in turn change size hints
+ propagateSizeHints();
+
// This is a special case where the buffer is recreated, but since
// the content rect remains the same, the widgets remain the same
// size and are not redrawn, leaving the new buffer empty. As a simple