From 683228f8de4fb58df210431b555669afd32c6a5b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 16 May 2013 11:32:20 +0200 Subject: iOS: don't activate non-toplevel windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/ios/qioswindow.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 02ac413b3b..13815a22bf 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -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(); -- cgit v1.2.3