From 91a261b6edc2cbcb7d3f46284aa6920685b23fb7 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 23 Jan 2024 11:57:41 +0000 Subject: [PATCH] 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 Pick-to: 6.7 Change-Id: Ie8c1898859774e1c8dff93695af15327379ad3b6 Reviewed-by: Liang Qi --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 2be24111d2a..c42bb6526b4 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -1121,6 +1121,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