summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-12-23 22:59:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-12-23 22:59:30 +0000
commitcd6070461e42fa23e1af04add0dcdb3346b2b9a1 (patch)
tree3a4e3e724fdeb93b8280477f58b118da4d519513 /gtk/gtkimcontextsimple.c
parent1806c0eed8def0e7e27786e63b670875aa94a8f6 (diff)
downloadgtk+-cd6070461e42fa23e1af04add0dcdb3346b2b9a1.tar.gz
1.3.12, interface, binary age 0.
Sat Dec 22 12:38:03 2001 Owen Taylor <otaylor@redhat.com> * configure.in: 1.3.12, interface, binary age 0. * configure.in: Require new versions of Glib, Pango, ATK. * NEWS: Updated. * configure.in: Make explicit what libtool we are executing. (Tomas Ogren) * gdk/gdkcolor.c gdk/gdkgc.c gdk/gdkwindow.c: Doc fixes. * gtk/gtkwidget.c (gtk_widget_[class]path) gtkrc.h : Fix parameter names for docs. Sat Dec 22 22:35:29 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_realize) gtk/gtkplug.c (gtk_plug_realize): Include GDK_KEY_RELEASE_MASK. * gtk/gtkentry.c (gtk_entry_key_release) gtk/gtktextview.c (gtk_text_view_key_release_event): Pass key release events to the input method. * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress): Handle release of Control/Shift to end hex sequence. * modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress): Handle key releases as well as presses.
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 8fe5a4cd7a..e9a69d7e03 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1116,9 +1116,20 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
int n_compose = 0;
int i;
- /* FIXME? 14755 says you have to commit the char on release of the shift/control
- * keys. But instead we wait for the user to type another char, or to lose focus.
- */
+ if (event->type == GDK_KEY_RELEASE)
+ {
+ if (context_simple->in_hex_sequence &&
+ (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;
+
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
/* Ignore modifier key presses
*/