summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioswindow.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2014-11-24 17:12:57 +0100
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2014-11-26 15:57:23 +0100
commita7dcc661d59851ca93f56a57131563e86d531773 (patch)
tree7c620c0702aaa28af3fee9afcf707ceb37b2b33f /src/plugins/platforms/ios/qioswindow.mm
parentcf8dc020ffad8908acc5983d75643189b73fb0b9 (diff)
iOS: only skip activating the most simple popup types
The current approach of not activating transient windows with the popup flag set was found to be too restrictive, as it would e.g stop transient dialogs from being able to contain editable controls. This patch will restrict the number of popup types that we skip activation for to only contain a few subtypes. Task-number: QTBUG-41613 Change-Id: I381a5a79fb4f7082da18a6b4e06a7255ff400b1a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.mm')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index b0c5f15306..480062e4de 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -145,9 +145,10 @@ void QIOSWindow::setVisible(bool visible)
bool QIOSWindow::shouldAutoActivateWindow() const
{
// We don't want to do automatic window activation for popup windows
- // (including Tool, ToolTip and SplashScreen windows), unless they
- // are standalone (no parent/transient parent), and hence not active.
- return !(window()->type() & Qt::Popup) || !window()->isActive();
+ // that are unlikely to contain editable controls (to avoid hiding
+ // the keyboard while the popup is showing)
+ const Qt::WindowType type = window()->type();
+ return (type != Qt::Popup && type != Qt::ToolTip) || !window()->isActive();
}
void QIOSWindow::setOpacity(qreal level)