summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-12-02 22:34:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-03 14:12:20 +0100
commit119ea0f2dbaa4cdea6929e542c59f99b2dfd0ef9 (patch)
treea3bc438803e6d48e8bb8ddab0ada4953eb5cec9e /src/plugins/platforms/ios
parent9302169bd5ad8380ebe95f50986d2b32eb486901 (diff)
iOS: fix application hangs when opening keyboard
QIOSInputContext controls QUIViews first responder status based on whether or not the keyboard should be open. But since QGuiApplication updates focusObject before focusWindow (when e.g a popup closes), we sometimes ended up activating the old window upon a call to becomeFirstResponder. This in turn led the application to hang because of recursive dependencies in qioscontext when the focus window changed. So the solution for now is to avoid activating the window when the view becomes first responder. This should be fine since we now activate the window from QIOSWindow::requestActivateWindow (ref: 6272a816d1) Task-number: QTBUG-35340 Change-Id: I3068c14fec18d84d4b0b348a043c4c054e366c75 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 0dd810bdf6..43f36e32e0 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -330,13 +330,9 @@
- (BOOL)becomeFirstResponder
{
- // On iOS, a QWindow should only have input focus when the input panel is
- // open. This is to stop cursors and focus rects from being drawn when the
- // user cannot type. And since the keyboard will open when a view becomes
- // the first responder, it's now a good time to inform QPA that the QWindow
- // this view backs became active:
+ // Note: QIOSInputContext controls our first responder status based on
+ // whether or not the keyboard should be open or closed.
[self updateTextInputTraits];
- QWindowSystemInterface::handleWindowActivated(m_qioswindow->window());
return [super becomeFirstResponder];
}