summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-08-22 06:41:31 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-08-22 06:49:35 -0400
commit2f909cc474bf3b72f51eb2cac78a064d395988a1 (patch)
treef3a9ceef9a54fcb0bebb18cfb1eab837fa579b37
parente3f99fa2df0ef52f3624159e19d2828552a8a1c5 (diff)
downloadgtk+-2f909cc474bf3b72f51eb2cac78a064d395988a1.tar.gz
Don't consume too many key releases
The Emoji input support in GtkIMContextSimple was unintentionally consuming too many key release events. Fix this. https://bugzilla.gnome.org/show_bug.cgi?id=786594
-rw-r--r--gtk/gtkimcontextsimple.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index c83e0495dc..a27cb57507 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1177,11 +1177,14 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
gtk_im_context_simple_commit_char (context, priv->tentative_match);
priv->compose_buffer[0] = 0;
+ return TRUE;
}
else if (priv->in_emoji_sequence ||
(priv->in_hex_sequence && n_compose == 0))
{
priv->modifiers_dropped = TRUE;
+
+ return TRUE;
}
else if (priv->in_hex_sequence)
{
@@ -1195,12 +1198,12 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
g_signal_emit_by_name (context_simple, "preedit-changed");
g_signal_emit_by_name (context_simple, "preedit-end");
- }
- return TRUE;
+ return TRUE;
+ }
}
- else
- return FALSE;
+
+ return FALSE;
}
/* Ignore modifier key presses */