diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-04-30 14:58:15 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-05-06 19:47:14 +0000 |
commit | 63a46568bf927934027259486110f82f896105f7 (patch) | |
tree | 787cef3dbef0bc606e8cb2a34b3434f803587cea /src | |
parent | 41492b8b68785f277a24525f08daf82271c4a8bd (diff) |
ios: don't autoactivate if _q_showWithoutActivating
Widgets can have the attribute Qt::WA_ShowWithoutActivating
set, which is forwarded to QWindow as a property
(_q_showWithoutActivating). Both The cocoa plugin and
the windows plugin check for this property before
activating a window upon setVisible, so lets do the
same for the iOS plugin.
Note that this is not the same as shouldAutoActivate, since
the window should gain focus like normal if the user
taps on it.
Change-Id: Ie6c95d4044906d97f0a03d27009a23d462c6ca34
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/ios/qioswindow.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index daeebee3a1..80fba00ffb 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -119,7 +119,8 @@ void QIOSWindow::setVisible(bool visible) } if (visible && shouldAutoActivateWindow()) { - requestActivateWindow(); + if (!window()->property("_q_showWithoutActivating").toBool()) + requestActivateWindow(); } else if (!visible && [m_view isActiveWindow]) { // Our window was active/focus window but now hidden, so relinquish // focus to the next possible window in the stack. |