If im is not active, ibus will do nothing when prev engine hotkey
authorPeng Huang <shawn.p.huang@gmail.com>
Mon, 20 Apr 2009 02:28:58 +0000 (10:28 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Mon, 20 Apr 2009 02:28:58 +0000 (10:28 +0800)
is pressed.

bus/inputcontext.c

index 7003bd7..a7d53e1 100644 (file)
@@ -2098,10 +2098,10 @@ bus_input_context_filter_keyboard_shortcuts (BusInputContext    *context,
         return TRUE;
     }
     else if (event == prev_factory) {
-        g_signal_emit (context, context_signals[REQUEST_PREV_ENGINE], 0);
-        if (priv->engine && !priv->enabled) {
-            bus_input_context_enable (context);
+        if (priv->engine == NULL || priv->enabled == FALSE) {
+            return FALSE;
         }
+        g_signal_emit (context, context_signals[REQUEST_PREV_ENGINE], 0);
         return TRUE;
     }
     else