From d415e945d62d69c097cf6aae701f42806529dfb7 Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Thu, 5 Mar 2009 14:39:12 +0800 Subject: Process release key event correctly. --- src/ibushotkey.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ibushotkey.c') diff --git a/src/ibushotkey.c b/src/ibushotkey.c index 0f1b314..1d3a4b3 100644 --- a/src/ibushotkey.c +++ b/src/ibushotkey.c @@ -459,6 +459,8 @@ GQuark ibus_hotkey_profile_filter_key_event (IBusHotkeyProfile *profile, guint keyval, guint modifiers, + guint prev_keyval, + guint prev_modifiers, gpointer user_data) { IBusHotkeyProfilePrivate *priv; @@ -469,6 +471,10 @@ ibus_hotkey_profile_filter_key_event (IBusHotkeyProfile *profile, .modifiers = modifiers & priv->mask, }; + if ((modifiers & IBUS_RELEASE_MASK) && keyval != prev_keyval) { + return 0; + } + GQuark event = (GQuark) GPOINTER_TO_UINT (g_tree_lookup (priv->hotkeys, &hotkey)); if (event != 0) { -- cgit