diff options
author | Peng Wu <pwu@redhat.com> | 2021-03-16 15:06:05 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-03-22 13:35:59 +0100 |
commit | 155d5774e1ac9ccfbba694cc90383b36f1b0aa71 (patch) | |
tree | 1ea1e855f3f631a66ddc4402ff64c6e8c8de1c90 | |
parent | ec2b62cabfad6e44bb655648fcee47243498d1c2 (diff) | |
download | wayland-protocols-155d5774e1ac9ccfbba694cc90383b36f1b0aa71.tar.gz |
text-input: Add preedit_commit_mode event for mouse click event
IBus update_preedit_string_with_mode feature send the preedit text and
the commit mode to the input method module, use preedit_commit_mode event
to send the commit mode together with the preeedit text.
IBusInputContext specify how input context interact with the keyboard,
but sometimes mouse click also interacts with the input context, too.
For Firefox, if some preedit text is visible with ibus-hangul input method;
after mouse click, the preedit will be committed twice.
To fix this issue, ibus-hangul can send preedit text and commit mode
together; after mouse click, the preedit is handled directly in
input method module of Firefox, and the preedit is committed in
the current text widget.
For detailed analysis, please read the merge request comments.
URL: https://gitlab.freedesktop.org/wayland/wayland-protocols/merge_requests/30
Signed-off-by: Peng Wu <pwu@redhat.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Reviewed-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
-rw-r--r-- | unstable/text-input/text-input-unstable-v4.xml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/unstable/text-input/text-input-unstable-v4.xml b/unstable/text-input/text-input-unstable-v4.xml index b4d33ee..8a09836 100644 --- a/unstable/text-input/text-input-unstable-v4.xml +++ b/unstable/text-input/text-input-unstable-v4.xml @@ -417,6 +417,32 @@ </description> <arg name="serial" type="uint"/> </event> + + <enum name="commit_mode"> + <description summary="focus commit mode"> + Pre-edit commit mode when the focus widget or the cursor position + is changed. + </description> + <entry name="clear" value="0" summary="pre-edit text is cleared"/> + <entry name="commit" value="1" summary="pre-edit text is committed"/> + </enum> + + <event name="preedit_commit_mode"> + <description summary="pre-edit commit mode"> + Specify how the visible preedit should be handled + when switching the focus widget or changing the cursor position, + whether to commit the preedit text or clear the preedit text. + + This is usually used together with the preedit_string event. + + The commit behavior is the same for focus switch and + cursor position change. + + The parameter mode selects the desired behavior and + its value is one from the commit mode enum. + </description> + <arg name="mode" type="uint" enum="commit_mode"/> + </event> </interface> <interface name="zwp_text_input_manager_v4" version="1"> |