|
|
186ff6 |
From a30186cab6a8df054aee7b71b10574fde1be557b Mon Sep 17 00:00:00 2001
|
|
|
186ff6 |
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
|
186ff6 |
Date: Tue, 7 May 2019 18:16:56 +0900
|
|
|
186ff6 |
Subject: [PATCH] client/gtk2: Keep preedit cursor_pos and visible in clearing
|
|
|
186ff6 |
preedit text
|
|
|
186ff6 |
|
|
|
186ff6 |
Clear the preedit_string but keep the preedit_cursor_pos and
|
|
|
186ff6 |
preedit_visible because a time lag could happen, firefox commit
|
|
|
186ff6 |
the preedit text before the preedit text is cleared and it cause
|
|
|
186ff6 |
a double commits of the Hangul preedit in firefox if the preedit
|
|
|
186ff6 |
would be located on the URL bar and click on anywhere of firefox
|
|
|
186ff6 |
out of the URL bar.
|
|
|
186ff6 |
---
|
|
|
186ff6 |
client/gtk2/ibusimcontext.c | 12 ++++++++++--
|
|
|
186ff6 |
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
186ff6 |
|
|
|
186ff6 |
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
|
|
|
186ff6 |
index 264a747a..5e3457ba 100644
|
|
|
186ff6 |
--- a/client/gtk2/ibusimcontext.c
|
|
|
186ff6 |
+++ b/client/gtk2/ibusimcontext.c
|
|
|
186ff6 |
@@ -881,10 +881,18 @@ ibus_im_context_clear_preedit_text (IBusIMContext *ibusimcontext)
|
|
|
186ff6 |
ibusimcontext->preedit_mode == IBUS_ENGINE_PREEDIT_COMMIT) {
|
|
|
186ff6 |
preedit_string = g_strdup (ibusimcontext->preedit_string);
|
|
|
186ff6 |
}
|
|
|
186ff6 |
+
|
|
|
186ff6 |
+ /* Clear the preedit_string but keep the preedit_cursor_pos and
|
|
|
186ff6 |
+ * preedit_visible because a time lag could happen, firefox commit
|
|
|
186ff6 |
+ * the preedit text before the preedit text is cleared and it cause
|
|
|
186ff6 |
+ * a double commits of the Hangul preedit in firefox if the preedit
|
|
|
186ff6 |
+ * would be located on the URL bar and click on anywhere of firefox
|
|
|
186ff6 |
+ * out of the URL bar.
|
|
|
186ff6 |
+ */
|
|
|
186ff6 |
_ibus_context_update_preedit_text_cb (ibusimcontext->ibuscontext,
|
|
|
186ff6 |
ibus_text_new_from_string (""),
|
|
|
186ff6 |
- 0,
|
|
|
186ff6 |
- FALSE,
|
|
|
186ff6 |
+ ibusimcontext->preedit_cursor_pos,
|
|
|
186ff6 |
+ ibusimcontext->preedit_visible,
|
|
|
186ff6 |
IBUS_ENGINE_PREEDIT_CLEAR,
|
|
|
186ff6 |
ibusimcontext);
|
|
|
186ff6 |
if (preedit_string) {
|
|
|
186ff6 |
--
|
|
|
186ff6 |
2.20.1
|
|
|
186ff6 |
|