summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-09-09 17:42:26 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-10 19:16:57 +0000
commited0188ec58c5572ce6fdad0cc431c2689872a299 (patch)
treefe2b828c02522945598c8f76c7a714a9fb7fd4c8
parente5e064b170bf694a24e0225f5cafea5829c9ad72 (diff)
Always give Qt::SubWindows a default window state of Qt::WindowNoState
On platforms such as iOS, the default window state is Qt::WindowMaximized, so that calling show() will fill the entire screen. But sub-windows should not get this treatment, as their geometry is typically managed manually. Change-Id: Ib17c2011a16baf6023fe368b94fa7f38e12bd777 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit c066cd260087199ed309600d1b924af270cc3a14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/gui/kernel/qplatformintegration.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index a53f0d09d7..1427db5c61 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -450,6 +450,9 @@ Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags)
if (flags & Qt::Popup & ~Qt::Window)
return Qt::WindowNoState;
+ if (flags & Qt::SubWindow)
+ return Qt::WindowNoState;
+
if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool())
return Qt::WindowFullScreen;
else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool())