From 6af3ad3243d1d26dec67e8844137fd145992fec9 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 24 Mar 2020 15:50:43 +0800 Subject: [PATCH] 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 --- .../text-input/text-input-unstable-v3.xml | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/unstable/text-input/text-input-unstable-v3.xml b/unstable/text-input/text-input-unstable-v3.xml index d5f6322..6d602ad 100644 --- a/unstable/text-input/text-input-unstable-v3.xml +++ b/unstable/text-input/text-input-unstable-v3.xml @@ -47,7 +47,7 @@ interface version number is reset. - + The zwp_text_input_v3 interface represents text input and input methods associated with a seat. It provides enter/leave events to follow the @@ -428,9 +428,35 @@ + + + + Pre-edit commit mode when the focus widget or the cursor position + is changed. + + + + + + + + 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. + + + - + A factory for text-input objects. This object is a global singleton.