summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosinputcontext.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-10-16 14:46:55 +0200
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-10-31 14:42:55 +0100
commit8cce08fbf914f949009eddda589c64a55925d733 (patch)
tree23c9fca2279591b1c451c1bd6b2fe43f9fb6133e /src/plugins/platforms/ios/qiosinputcontext.mm
parent08b1afc8f436f5221165fc074a9cab8f8a06bd67 (diff)
iOS: Make sure we update hints and platform data on IM enable/disable
Change-Id: If4d9c9c769b598a3194a7cd5bbe5c74e7650694b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosinputcontext.mm')
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm
index b403154321..70307f7f54 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.mm
+++ b/src/plugins/platforms/ios/qiosinputcontext.mm
@@ -443,6 +443,15 @@ void QIOSInputContext::update(Qt::InputMethodQueries updatedProperties)
// Mask for properties that we are interested in and see if any of them changed
updatedProperties &= (Qt::ImEnabled | Qt::ImHints | Qt::ImQueryInput | Qt::ImPlatformData);
+ if (updatedProperties & Qt::ImEnabled) {
+ // Switching on and off input-methods needs a re-fresh of hints and platform
+ // data when we turn them on again, as the IM state we have may have been
+ // invalidated when IM was switched off. We could defer this until we know
+ // if IM was turned on, to limit the extra query parameters, but for simplicity
+ // we always do the update.
+ updatedProperties |= (Qt::ImHints | Qt::ImPlatformData);
+ }
+
Qt::InputMethodQueries changedProperties = m_imeState.update(updatedProperties);
if (changedProperties & (Qt::ImEnabled | Qt::ImHints | Qt::ImPlatformData)) {
// Changes to enablement or hints require virtual keyboard reconfigure