summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2020-11-16 19:37:33 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2020-11-17 11:05:59 +0000
commit6ed363e3665f17d935f8636d9c958154c898f5c5 (patch)
tree4ec75ce33357eb4449ca9d44c5c2448bc7816e69 /src
parent92f9a3142c0b24db39e6d04f707cad65205bd374 (diff)
Make setting QT_SCALE_FACTOR work on Wayland
Follow-up to 8cb1b07aea12d50b4fecc45c903705dfd368022a, fixes one additional case (Use of minimum/maximum size). Fixes: QTBUG-87762 Pick-to: 5.15 Change-Id: I73e0df2529b0cadf25ad50ea7459cdbb92caf424 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylandwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 328e4f3ce..82018a5eb 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -331,9 +331,11 @@ void QWaylandWindow::setWindowIcon(const QIcon &icon)
void QWaylandWindow::setGeometry_helper(const QRect &rect)
{
+ QSize minimum = windowMinimumSize();
+ QSize maximum = windowMaximumSize();
QPlatformWindow::setGeometry(QRect(rect.x(), rect.y(),
- qBound(window()->minimumWidth(), rect.width(), window()->maximumWidth()),
- qBound(window()->minimumHeight(), rect.height(), window()->maximumHeight())));
+ qBound(minimum.width(), rect.width(), maximum.width()),
+ qBound(minimum.height(), rect.height(), maximum.height())));
if (mSubSurfaceWindow) {
QMargins m = QPlatformWindow::parent()->frameMargins();