iOS: Allow non-top-level windows to be activated

As tested and assumed by tst_QWindow::isActive().

Change-Id: I8d09263ce0acc9c3390a70b4089396257197a1be
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
bb10
Tor Arne Vestbø 2013-11-15 19:33:57 +01:00 committed by The Qt Project
parent 837228151d
commit c3e949ac7d
1 changed files with 4 additions and 2 deletions

View File

@ -484,12 +484,14 @@ void QIOSWindow::requestActivateWindow()
// Note that several windows can be active at the same time if they exist in the same
// hierarchy (transient children). But only one window can be QGuiApplication::focusWindow().
// Dispite the name, 'requestActivateWindow' means raise and transfer focus to the window:
if (!window()->isTopLevel() || blockedByModal())
if (blockedByModal())
return;
[m_view.window makeKeyWindow];
raise();
if (window()->isTopLevel())
raise();
QPlatformInputContext *context = QGuiApplicationPrivate::platformIntegration()->inputContext();
static_cast<QIOSInputContext *>(context)->focusViewChanged(m_view);
QWindowSystemInterface::handleWindowActivated(window());