[gtk/fix-im-reset-3-24] imcontextsimple: Fix a possible problem




commit 0952c11beca27dda25788757bfedd15cee798450
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 24 18:52:14 2021 -0400

    imcontextsimple: Fix a possible problem
    
    We were forgetting to handle the compose sequence
    case in reset().

 gtk/gtkimcontextsimple.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index eb9d7cfbd4..0ca1843976 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1053,9 +1053,12 @@ gtk_im_context_simple_reset (GtkIMContext *context)
 
   priv->compose_buffer[0] = 0;
 
-  if (priv->tentative_match->len > 0 || priv->in_hex_sequence)
+  if (priv->tentative_match->len > 0 ||
+      priv->in_hex_sequence ||
+      priv->in_compose_sequence)
     {
       priv->in_hex_sequence = FALSE;
+      priv->in_compose_sequence = FALSE;
       g_string_set_size (priv->tentative_match, 0);
       priv->tentative_match_len = 0;
       g_signal_emit_by_name (context_simple, "preedit-changed");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]