Fix to return false in ibus_simple_engine_process_key_event
authorfujiwarat <takao.fujiwara1@gmail.com>
Wed, 29 Feb 2012 06:44:00 +0000 (15:44 +0900)
committerfujiwarat <takao.fujiwara1@gmail.com>
Wed, 29 Feb 2012 06:44:00 +0000 (15:44 +0900)
IM clients expect filter_keypress returns FALSE when IME is disabled.
Now we use the simple engine instead of the disabled state so
it would be better that process_key_event returns FALSE for ASCII.

BUG=RH#769133
TEST=Linux desktop

Review URL: https://codereview.appspot.com/5707057

src/ibusenginesimple.c

index 8bd1ff4..5dd78f3 100644 (file)
@@ -661,7 +661,11 @@ no_sequence_matches (IBusEngineSimple *simple,
         }
 
         ch = ibus_keyval_to_unicode (keyval);
-        if (ch != 0 && !g_unichar_iscntrl (ch)) {
+        /* IBUS_CHANGE: RH#769133
+         * Since we use ibus xkb engines as the disable state,
+         * do not commit the characters locally without in_hex_sequence. */
+        if (ch != 0 && !g_unichar_iscntrl (ch) &&
+            priv->in_hex_sequence) {
             ibus_engine_simple_commit_char (simple, ch);
             return TRUE;
         }