diff options
author | Lukasz Stanislawski <l.stanislaws@samsung.com> | 2015-06-24 12:24:26 +0200 |
---|---|---|
committer | Lukasz Stanislawski <l.stanislaws@samsung.com> | 2015-06-29 09:15:53 +0200 |
commit | 6de8bc0a2b6476b9cc849f25d076a0402bb45fb5 (patch) | |
tree | dce6964ae54be634d970f1aae1f16c3e54f6247d | |
parent | 6f8a49ebc2cc38ef733f4d2b0ca6e4489c76fbd0 (diff) | |
download | elementary-6de8bc0a2b6476b9cc849f25d076a0402bb45fb5.tar.gz |
atspi; return proper children id on children-changed:remove
Change-Id: I704b3f63a3bb104a8df234b597a61616dd504ffb
-rw-r--r-- | src/lib/elm_atspi_bridge.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c index 327c42d4f..507f308f0 100644 --- a/src/lib/elm_atspi_bridge.c +++ b/src/lib/elm_atspi_bridge.c @@ -1785,6 +1785,15 @@ _access_object_from_path(const char *path) unsigned long long eo_ptr = 0; Eo *eo = NULL; const char *tmp = path; + Eo *ret; + + ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN_VAL(_instance, pd, NULL); + + if (!eina_hash_find(pd->cache, path)) + { + WRN("Request for nonexisting object: %s", path); + return NULL; + } int len = strlen(ELM_ACCESS_OBJECT_PATH_PREFIX); @@ -1797,7 +1806,8 @@ _access_object_from_path(const char *path) sscanf(tmp, "%llu", &eo_ptr); eo = (Eo *) (uintptr_t) eo_ptr; - return eo_isa(eo, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN) ? eo : NULL; + ret = eo_isa(eo, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN) ? eo : NULL; + return ret; } static char * @@ -2871,7 +2881,7 @@ _children_changed_signal_send(void *data, Eo *obj, const Eo_Event_Description *d break; case ATSPI_OBJECT_CHILD_REMOVED: atspi_desc = "remove"; - idx = -1; + eo_do(ev_data->child, idx = elm_interface_atspi_accessible_index_in_parent_get()); break; } @@ -3393,8 +3403,8 @@ static void _bridge_object_register(Eo *bridge, Eo *obj) sig = eldbus_service_signal_new(pd->cache_interface, ATSPI_OBJECT_CHILD_ADDED); Eldbus_Message_Iter *iter = eldbus_message_iter_get(sig); _append_item_fn(NULL, NULL, obj, iter); - eldbus_service_signal_send(pd->cache_interface, sig); + free(path); } |