iOS: don't activate non-toplevel windows

Parts of the code seems to assume that all QWindows are
top-level windows. This will be false when not using
alien, as then, each widget will be wrapped inside a
QWidgetWindow. In that case, we should not tell QPA to
activate the "window".

This bug caused focus handling (and text input) to fall
apart for e.g graphicsview when using a QGLWidget as viewport.

Change-Id: I579db7a84d718973e02e96ed535fe6e25baf4bd5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
bb10
Richard Moe Gustavsen 2013-05-16 11:32:20 +02:00 committed by The Qt Project
parent 9ae5162b3c
commit 683228f8de
1 changed files with 1 additions and 1 deletions

View File

@ -407,7 +407,7 @@ 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 (blockedByModal())
if (!window()->isTopLevel() || blockedByModal())
return;
raise();