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 <paul.tvete@qt.io>
This commit is contained in:
David Edmundson 2023-12-13 09:45:05 +00:00
parent 89dff9764a
commit 84aed4465e

View File

@ -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();