Do not force top level flag on embedded windows.

Regression introduced by cd7ba89a07.

Task-number: QTBUG-29564
Task-number: QTBUG-28872
Change-Id: I6402a971af89321d18afb42dc25e54b1c88df129
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Friedemann Kleint 2013-02-08 10:19:42 +01:00 committed by The Qt Project
parent bc8727cbbc
commit 391b5a465e

View File

@ -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) {