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>
This commit is contained in:
parent
41492b8b68
commit
63a46568bf
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user