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

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