summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-09-11 11:17:41 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-09-11 11:20:07 -0400
commit86f018c6a7a4187ed810163cfce290368b755ee3 (patch)
tree6724c73f6ad25579835747de7c68a5eabe518cd8 /gtk/gtkimcontextsimple.c
parent781821bae4b13612a4df8df80e8b506fcc7a34fc (diff)
downloadgtk+-86f018c6a7a4187ed810163cfce290368b755ee3.tar.gz
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.
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index a27cb57507..031417c872 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 ||