summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 2a26e092eb..07dc668b3f 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -345,10 +345,12 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
if (creationFlags & ForceChild) {
topLevel = false;
- } else if (creationFlags & ForceTopLevel) {
- topLevel = true;
+ } else if (embedded) {
+ // Embedded native windows (for example Active X server windows) are by
+ // definition never toplevel, even though they do not have QWindow parents.
+ topLevel = false;
} else {
- topLevel = w->isTopLevel();
+ topLevel = (creationFlags & ForceTopLevel) ? true : w->isTopLevel();
}
if (topLevel && flags == 1) {