From 84aed4465ee951b60c334eee4a58ab1fb28301d7 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 13 Dec 2023 09:45:05 +0000 Subject: [PATCH] client: Do not constrain clients to size hints The behavior of constraining requests from the system to the client requested size does not appear to be in other backends. It was added to QWayland before xdg-shell/qt-shell existed with hints that can be supplied to the window manager. This is important as the specification states that maximized windows must follow the geometry requested and there is some movement towards this applying for all tiled states. Task-number: QTBUG-120035 Pick-to: 6.7 Change-Id: I7c203db18e34a8f81a39c504591f6b54df076da8 Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 610cc9e50bc..a03878b570c 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -398,17 +398,7 @@ QRect QWaylandWindow::defaultGeometry() const void QWaylandWindow::setGeometry_helper(const QRect &rect) { - QSize minimum = windowMinimumSize(); - QSize maximum = windowMaximumSize(); - int width = windowGeometry().width(); - int height = windowGeometry().height(); - if (minimum.width() <= maximum.width() - && minimum.height() <= maximum.height()) { - width = qBound(minimum.width(), rect.width(), maximum.width()); - height = qBound(minimum.height(), rect.height(), maximum.height()); - } - - QPlatformWindow::setGeometry(QRect(rect.x(), rect.y(), width, height)); + QPlatformWindow::setGeometry(rect); if (mViewport) updateViewport();