summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioswindow.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-10-29 14:11:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 20:50:09 +0100
commit6272a816d192b3c9b363164216bfd7a13e7370e9 (patch)
tree0c6792815f04cbb38243d80c1a322cbb8ce10948 /src/plugins/platforms/ios/qioswindow.mm
parent1d54a502dd302da0b3676cfc7f35d2aa92610cf2 (diff)
iOS: set active window upon calls to requestActiveWindow
We did not do this from before. Instead we would activate the window when it's view became first responder. And this would happen when the input panel was told to open. That behavior is a fragile, since other layers higher up (qml) would not open the input panel unless the window was active, which also makes sense. A classic chicken and egg problem. So to play more along with how Qt is expected to work, we change behavior to instead activate the window directly when requested to do so (which also includes when the user touches the window directly). This will also work better for "keyboard" events like Key_VolumeUp, once implemented. The down side is that Qt will give focus to widgets/items (and as such, open the keyboard) whenever you touch the window. But that is easier to fix, and will be dealt with in later patches. Change-Id: I9bbeb0205e7ea3c5079100c07e40ddb1c60b476b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.mm')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 25c11a210d..f1189ccd88 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -440,6 +440,7 @@ void QIOSWindow::requestActivateWindow()
raise();
QPlatformInputContext *context = QGuiApplicationPrivate::platformIntegration()->inputContext();
static_cast<QIOSInputContext *>(context)->focusViewChanged(m_view);
+ QWindowSystemInterface::handleWindowActivated(window());
}
void QIOSWindow::raiseOrLower(bool raise)