From 5bd2ecc54d35be7724720eaa100349b58f8af109 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Fri, 20 Aug 2021 09:42:15 +0900 Subject: [PATCH] src/ibuscomposetable: Do not output incompleted compose dead keys Incompleted dead keys are used in fi_FI compose. --- src/ibuscomposetable.c | 2 +- src/ibusenginesimple.c | 30 +++++------------------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c index a0b0befc1..d4184d305 100644 --- a/src/ibuscomposetable.c +++ b/src/ibuscomposetable.c @@ -514,7 +514,7 @@ ibus_compose_list_check_duplicated (GList *compose_list, for (list = compose_list; list != NULL; list = list->next) { int i; int n_compose = 0; - gboolean compose_finish; + gboolean compose_finish = FALSE; gunichar *output_chars = NULL; gunichar output_char = 0; guint n_outputs; diff --git a/src/ibusenginesimple.c b/src/ibusenginesimple.c index acfc0264f..83b04ebc3 100644 --- a/src/ibusenginesimple.c +++ b/src/ibusenginesimple.c @@ -788,31 +788,11 @@ ibus_engine_simple_check_all_compose_table (IBusEngineSimple *simple, gunichar *output_chars = NULL; gunichar output_char = '\0'; - if (n_compose == 2) { - /* Special-case deadkey-deadkey sequences. - * We are not doing chained deadkeys, so we - * want to commit the first key, and contine - * preediting with second. - */ - if (IS_DEAD_KEY (priv->compose_buffer[0]) && - IS_DEAD_KEY (priv->compose_buffer[1])) { - gboolean need_space = FALSE; - gunichar ch = ibus_keysym_to_unicode (priv->compose_buffer[0], - FALSE, &need_space); - guint16 next = priv->compose_buffer[1]; - if (ch) { - if (need_space) - g_string_append_c (output, ' '); - g_string_append_unichar (output, ch); - ibus_engine_simple_commit_str (simple, output->str); - g_string_set_size (output, 0); - - priv->compose_buffer[0] = next; - priv->compose_buffer[1] = 0; - n_compose = 1; - } - } - } + /* GtkIMContextSimple output the first compose char in case of + * n_compose == 2 but it does not work in fi_FI copmose to output U+1EDD + * with the following sequence: + * : "ờ" U1EDD + */ G_LOCK (global_tables); tmp_list = global_tables;