summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwindowcontainer.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-09-09 17:45:42 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-09-10 13:07:27 +0000
commit296621a52f220dfd5456f6fb936f513a7b85b1af (patch)
tree6ca5fdb7333d78c0f895e7ba5cb22800200f0fb9 /src/widgets/kernel/qwindowcontainer.cpp
parentc066cd260087199ed309600d1b924af270cc3a14 (diff)
Set Qt::SubWindow on windows embedded by QWidget::createWindowContainer
The embedded window is parented into the containing QWindowContainer widget, which may either have a window handle itself, or is a child of a widget that has one (typically the top level). By setting Qt::SubWindow we inform clients about the embedded window's place in the world, allowing e.g. QPlatformIntegration::defaultWindowState to choose the correct state (Qt::WindowNoState) for the window instead of making it Qt::WindowMaximized on iOS. Pick-to: 6.2 6.2.0 Change-Id: Icf834192d99fee455aaba3c57bee1a4f1fde5025 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwindowcontainer.cpp')
-rw-r--r--src/widgets/kernel/qwindowcontainer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp
index b4d889fdfa..5484544444 100644
--- a/src/widgets/kernel/qwindowcontainer.cpp
+++ b/src/widgets/kernel/qwindowcontainer.cpp
@@ -234,6 +234,8 @@ QWindowContainer::QWindowContainer(QWindow *embeddedWindow, QWidget *parent, Qt:
d->fakeParent.setObjectName(windowName + QLatin1String("ContainerFakeParent"));
d->window->setParent(&d->fakeParent);
+ d->window->setFlag(Qt::SubWindow);
+
setAcceptDrops(true);
connect(QGuiApplication::instance(), SIGNAL(focusWindowChanged(QWindow*)), this, SLOT(focusWindowChanged(QWindow*)));