Fix NULL of focused input context
authorfujiwarat <takao.fujiwara1@gmail.com>
Thu, 18 Nov 2010 03:23:45 +0000 (12:23 +0900)
committerPeng Huang <shawn.p.huang@gmail.com>
Thu, 18 Nov 2010 04:27:59 +0000 (13:27 +0900)
bus/inputcontext.c

index ec72dd1..87fa162 100644 (file)
@@ -698,7 +698,7 @@ _ic_process_key_event  (BusInputContext       *context,
     if (G_UNLIKELY (!context->has_focus)) {
         /* workaround: set focus if context does not have focus */
         BusInputContext *focused_context = bus_ibus_impl_get_focused_input_context (BUS_DEFAULT_IBUS);
-        if (context == NULL ||
+        if (focused_context == NULL ||
             focused_context->fake == TRUE ||
             context->fake == FALSE) {
             /* grab focus, if context is a real IC or current focused IC is fake */