From de822885f49ca76e681c7f309d5017fcd0e22aeb Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 23 Jan 2024 11:57:41 +0000 Subject: 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 (cherry picked from commit 76569162c796be0ac927e04bfe8a6a71809ff7a1) Reviewed-by: Qt Cherry-pick Bot --- src/client/qwaylandwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3