summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-02-19 07:46:43 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-02-22 07:00:33 +0100
commit7d7ca27985055b355a21bc8b8aa511a5b213d299 (patch)
tree42c876bf61ac447b6d4aba1f583cf21c3ef39adb /src
parenta584930d055c8b8b705025332e1d927dde19a7ac (diff)
Fix sending input hints with new text input protocol
Using input method hints to request things like digits-only etc. did not work with the specialized Qt input method for two reasons: First of all the full state of the editor needs to be sent to the keyboard when the focus object is set. But even fixing this, it turned out that the recipient was not actually registering the input methods hints, but just overwriting the function argument with itself. Fixes: QTBUG-91206 Pick-to: 6.0 6.1 Change-Id: I1b8a3e92cc912bc06b6a2a60f8ea280393cd226e Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylandinputmethodcontext.cpp2
-rw-r--r--src/compositor/extensions/qwaylandqttextinputmethod.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/client/qwaylandinputmethodcontext.cpp b/src/client/qwaylandinputmethodcontext.cpp
index e6ab1da4f..4e81e1cd9 100644
--- a/src/client/qwaylandinputmethodcontext.cpp
+++ b/src/client/qwaylandinputmethodcontext.cpp
@@ -408,6 +408,8 @@ void QWaylandInputMethodContext::setFocusObject(QObject *)
m_currentWindow = window;
}
}
+
+ update(Qt::ImQueryAll);
}
}
diff --git a/src/compositor/extensions/qwaylandqttextinputmethod.cpp b/src/compositor/extensions/qwaylandqttextinputmethod.cpp
index 918957960..00d9da13d 100644
--- a/src/compositor/extensions/qwaylandqttextinputmethod.cpp
+++ b/src/compositor/extensions/qwaylandqttextinputmethod.cpp
@@ -123,7 +123,7 @@ void QWaylandQtTextInputMethodPrivate::text_input_method_v1_start_update(Resourc
void QWaylandQtTextInputMethodPrivate::text_input_method_v1_update_hints(Resource *resource, int32_t hints)
{
if (this->resource == resource)
- hints = Qt::InputMethodHints(hints);
+ this->hints = Qt::InputMethodHints(hints);
}
void QWaylandQtTextInputMethodPrivate::text_input_method_v1_update_anchor_position(Resource *resource, int32_t anchorPosition)