From 5ecd988706e97b21687dd9969d0708c0cd1532c1 Mon Sep 17 00:00:00 2001 From: Minchul Lee Date: Tue, 28 Mar 2017 12:11:12 +0900 Subject: [PATCH] elm_entry: monitor the cbhm daemon Change-Id: Icf01e24f07ab239ff78d73e4842b164f830d63c3 Signed-off-by: Minchul Lee --- src/lib/elm_entry.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index d236b1d..c80025a 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -132,13 +132,20 @@ static Eina_Bool _action_activate(Evas_Object *obj, const char *params); //TIZEN ONLY (20160926): cbhm client for multi entry #ifdef HAVE_ELEMENTARY_WAYLAND +#define CBHM_DBUS_OBJPATH "/org/tizen/cbhm/dbus" +#ifndef CBHM_DBUS_INTERFACE +#define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus" +#endif /* CBHM_DBUS_INTERFACE */ + static void -_cbhm_on_name_owner_changed(void *data EINA_UNUSED, - const char *bus EINA_UNUSED, const char *old_id EINA_UNUSED, - const char *new_id EINA_UNUSED) +_cbhm_on_name_owner_changed(void *data EINA_UNUSED, const char *bus, + const char *old_id, const char *new_id) { - /* FIXME : If entry should know the time cbhm service is started or stoped, - * use this function. */ + if ((!new_id || (new_id[0] == '\0')) + && strncmp(CBHM_DBUS_INTERFACE, bus, strlen(CBHM_DBUS_INTERFACE))) + { + ERR("cbhm daemon lost owner"); + } } static void @@ -154,11 +161,6 @@ _on_item_clicked(void *data, const Eldbus_Message *msg EINA_UNUSED) _paste_cb(obj, NULL, NULL); } -#define CBHM_DBUS_OBJPATH "/org/tizen/cbhm/dbus" -#ifndef CBHM_DBUS_INTERFACE -#define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus" -#endif /* CBHM_DBUS_INTERFACE */ - static void _cbhm_eldbus_init(Evas_Object *obj) { -- 2.7.4