Commit ff9eb56c authored by Jasper St. Pierre's avatar Jasper St. Pierre

Don't only use ch != 0 to check if a character is a control char.

https://bugzilla.gnome.org/show_bug.cgi?id=644976
parent 6ecfddf2
......@@ -746,7 +746,7 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
}
ch = gdk_keyval_to_unicode (event->keyval);
if (ch != 0)
if (ch != 0 && !g_unichar_iscntrl (ch))
{
gtk_im_context_simple_commit_char (context, ch);
return TRUE;
......
......@@ -355,7 +355,7 @@ gtk_im_multicontext_filter_keypress (GtkIMContext *context,
gunichar ch;
ch = gdk_keyval_to_unicode (event->keyval);
if (ch != 0)
if (ch != 0 && !g_unichar_iscntrl (ch))
{
gint len;
gchar buf[10];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment