Search toplevel when setting the active window from focus window.

Task-number: QTBUG-32177
Task-number: QTBUG-32180

Change-Id: I44bea8c15636d788d85d6cbfa737aca5901c532c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Friedemann Kleint 2013-07-03 16:16:17 +02:00 committed by The Qt Project
parent 3dde073269
commit a096b4680d

View File

@ -126,6 +126,8 @@ bool QApplicationPrivate::modalState()
QWidget *qt_tlw_for_window(QWindow *wnd)
{
while (wnd && !wnd->isTopLevel()) // QTBUG-32177, wnd might be a QQuickView embedded via window container.
wnd = wnd->parent();
if (wnd)
foreach (QWidget *tlw, qApp->topLevelWidgets())
if (tlw->windowHandle() == wnd)