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

https://bugzilla.gnome.org/show_bug.cgi?id=644976
This commit is contained in:
Jasper St. Pierre 2011-03-16 19:04:20 -04:00
parent 6ecfddf2e2
commit ff9eb56c6e
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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];