[gtk+/gtk-3-22] Fix a corner-case for emoji input



commit cf288a1b0920abe5787dc0ceaf279e66fe31396a
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Sep 11 11:17:41 2017 -0400

    Fix a corner-case for emoji input
    
    As reported in https://github.com/ibus/ibus/issues/1944,
    typing u201e while holding Ctrl+Shift used to give a „
    when letting go of Ctrl+Shift. This broke when we introduced
    Ctrl+Shift+e to start Emoji sequences. Fix this by only
    looking for Ctrl+Shift+e if we are not already in a hex
    sequence.

 gtk/gtkimcontextsimple.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 01de597..48d4568 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1220,7 +1220,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
   else
     have_hex_mods = (event->state & (hex_mod_mask)) == hex_mod_mask;
   is_hex_start = event->keyval == GDK_KEY_U;
-  is_emoji_start = event->keyval == GDK_KEY_E;
+  is_emoji_start = (event->keyval == GDK_KEY_E) && !priv->in_hex_sequence;
   is_end = (event->keyval == GDK_KEY_space ||
             event->keyval == GDK_KEY_KP_Space ||
             event->keyval == GDK_KEY_Return ||


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