From c066cd260087199ed309600d1b924af270cc3a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 9 Sep 2021 17:42:26 +0200 Subject: 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. Pick-to: 6.2 6.2.0 Change-Id: Ib17c2011a16baf6023fe368b94fa7f38e12bd777 Reviewed-by: Lars Knoll --- src/gui/kernel/qplatformintegration.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui') 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()) -- cgit v1.2.3