ios: don't accept first responder if Qt::WindowDoesNotAcceptFocus

Change-Id: I01801648a1971444e0727e1bf0790cb3a0d0aad5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Richard Moe Gustavsen 2015-04-30 14:49:13 +02:00
parent 856debeec1
commit 41492b8b68
2 changed files with 4 additions and 1 deletions

View File

@ -145,6 +145,9 @@ void QIOSWindow::setVisible(bool visible)
bool QIOSWindow::shouldAutoActivateWindow() const
{
if (![m_view canBecomeFirstResponder])
return false;
// We don't want to do automatic window activation for popup windows
// that are unlikely to contain editable controls (to avoid hiding
// the keyboard while the popup is showing)

View File

@ -194,7 +194,7 @@
- (BOOL)canBecomeFirstResponder
{
return YES;
return !(m_qioswindow->window()->flags() & Qt::WindowDoesNotAcceptFocus);
}
- (BOOL)becomeFirstResponder