Blame SOURCES/0006-Make-setting-QT_SCALE_FACTOR-work-on-Wayland.patch

429548
From a825fb5f714fd79d16cc3ebbdd327e7961b07d0a Mon Sep 17 00:00:00 2001
429548
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@qt.io>
429548
Date: Mon, 16 Nov 2020 19:37:33 +0100
429548
Subject: [PATCH 06/36] Make setting QT_SCALE_FACTOR work on Wayland
429548
429548
Follow-up to 8cb1b07aea12d50b4fecc45c903705dfd368022a,
429548
fixes one additional case (Use of minimum/maximum size).
429548
429548
Fixes: QTBUG-87762
429548
Change-Id: I73e0df2529b0cadf25ad50ea7459cdbb92caf424
429548
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
429548
(cherry picked from commit 6ed363e3665f17d935f8636d9c958154c898f5c5)
429548
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
429548
---
429548
 src/client/qwaylandwindow.cpp | 6 ++++--
429548
 1 file changed, 4 insertions(+), 2 deletions(-)
429548
429548
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
429548
index bc031ed5..eb053406 100644
429548
--- a/src/client/qwaylandwindow.cpp
429548
+++ b/src/client/qwaylandwindow.cpp
429548
@@ -332,9 +332,11 @@ void QWaylandWindow::setWindowIcon(const QIcon &icon)
429548
 
429548
 void QWaylandWindow::setGeometry_helper(const QRect &rect)
429548
 {
429548
+    QSize minimum = windowMinimumSize();
429548
+    QSize maximum = windowMaximumSize();
429548
     QPlatformWindow::setGeometry(QRect(rect.x(), rect.y(),
429548
-                qBound(window()->minimumWidth(), rect.width(), window()->maximumWidth()),
429548
-                qBound(window()->minimumHeight(), rect.height(), window()->maximumHeight())));
429548
+                qBound(minimum.width(), rect.width(), maximum.width()),
429548
+                qBound(minimum.height(), rect.height(), maximum.height())));
429548
 
429548
     if (mSubSurfaceWindow) {
429548
         QMargins m = QPlatformWindow::parent()->frameMargins();
429548
-- 
429548
2.33.1
429548