From a1178ee76dc726cd141ce91f764d43da476cdfb0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 6 Dec 2004 05:21:39 +0000 Subject: [PATCH] Prevent double commits, don't commit when Ctrl is present. (#160376, 2004-12-06 Matthias Clasen * modules/input/gtkimcontextime.c: Prevent double commits, don't commit when Ctrl is present. (#160376, Kazuki IWAMOTO) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ modules/input/gtkimcontextime.c | 4 ++++ 5 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index b5520afdae..11d8f8555d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-06 Matthias Clasen + + * modules/input/gtkimcontextime.c: Prevent double commits, + don't commit when Ctrl is present. (#160376, Kazuki IWAMOTO) + 2004-12-06 Hans Breuer * gtk/gtkcolorsel.c (key_press): Implement keynav for the color diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b5520afdae..11d8f8555d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-12-06 Matthias Clasen + + * modules/input/gtkimcontextime.c: Prevent double commits, + don't commit when Ctrl is present. (#160376, Kazuki IWAMOTO) + 2004-12-06 Hans Breuer * gtk/gtkcolorsel.c (key_press): Implement keynav for the color diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b5520afdae..11d8f8555d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-12-06 Matthias Clasen + + * modules/input/gtkimcontextime.c: Prevent double commits, + don't commit when Ctrl is present. (#160376, Kazuki IWAMOTO) + 2004-12-06 Hans Breuer * gtk/gtkcolorsel.c (key_press): Implement keynav for the color diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b5520afdae..11d8f8555d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-12-06 Matthias Clasen + + * modules/input/gtkimcontextime.c: Prevent double commits, + don't commit when Ctrl is present. (#160376, Kazuki IWAMOTO) + 2004-12-06 Hans Breuer * gtk/gtkcolorsel.c (key_press): Implement keynav for the color diff --git a/modules/input/gtkimcontextime.c b/modules/input/gtkimcontextime.c index da10077d83..833cf160b5 100644 --- a/modules/input/gtkimcontextime.c +++ b/modules/input/gtkimcontextime.c @@ -312,6 +312,9 @@ gtk_im_context_ime_filter_keypress (GtkIMContext *context, if (event->type == GDK_KEY_RELEASE) return FALSE; + if (event->state & GDK_CONTROL_MASK) + return FALSE; + context_ime = GTK_IM_CONTEXT_IME (context); if (!context_ime->focus) @@ -971,6 +974,7 @@ gtk_im_context_ime_message_filter (GdkXEvent *xevent, { g_signal_emit_by_name (context, "commit", utf8str); g_free (utf8str); + retval = TRUE; } }