summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-02-18 17:35:58 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-02-18 17:35:58 +0000
commit6f58c368d82f86781af97fbdf1792a2ca24f79eb (patch)
treefafc04c48df3b0632b50a564cbd0d35688d4f0a3 /gtk/gtkimcontextsimple.c
parent2e8d083c3c305354a2224a4cb44f8e5816b20f48 (diff)
downloadgtk+-6f58c368d82f86781af97fbdf1792a2ca24f79eb.tar.gz
Don't commit unless we got at least one hex digit. (#70619)
Mon Feb 18 12:31:52 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress): Don't commit unless we got at least one hex digit. (#70619)
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 6c545e715c..3f605f9f6d 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1122,8 +1122,13 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
(event->keyval == GDK_Control_L || event->keyval == GDK_Control_R ||
event->keyval == GDK_Shift_L || event->keyval == GDK_Shift_R))
{
- gtk_im_context_simple_commit_char (context, context_simple->tentative_match);
- context_simple->compose_buffer[0] = 0;
+ if (context_simple->tentative_match)
+ {
+ gtk_im_context_simple_commit_char (context, context_simple->tentative_match);
+ context_simple->compose_buffer[0] = 0;
+ }
+ else
+ context_simple->in_hex_sequence = 0;
return TRUE;
}