wkb-ibus: Fix repeatly create ibus-daemon.
authorAlex Wu <zhiwen.wu@linux.intel.com>
Mon, 17 Feb 2014 04:53:19 +0000 (12:53 +0800)
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Mon, 17 Feb 2014 14:00:19 +0000 (11:00 -0300)
It is possible that the ibus-daemon is up but weekeyboard can't
get anything from it. In this case, weekeyboard will always create
a new ibus-daemon. This patch fix it.

Change-Id: If7cb00345971769c3f95b54e74f723013835514d
Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
src/wkb-ibus.c

index b1651e3c43fdd7fc5a8600e32e1e1e04cf2e8e25..5c1c3eb2c0e678cbe4a53af0edabe3bf2a6cc092 100644 (file)
@@ -317,8 +317,11 @@ _wkb_ibus_exe_data_cb(void *data, int type, void *event_data)
 
    if (strncmp(exe_data->data, "(null)", exe_data->size) == 0)
      {
-        INF("IBus daemon is not running, spawning");
-        ecore_idler_add(_wkb_ibus_launch_idler, NULL);
+        if (!wkb_ibus->ibus_daemon)
+          {
+             INF("IBus daemon is not running, spawning");
+             ecore_idler_add(_wkb_ibus_launch_idler, NULL);
+          }
         goto end;
      }
    else if (strstr(exe_data->data, "unknown command") != NULL)