From b6f58c10b60cd0eb6a82784d39e576ea36c92a20 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Wed, 13 Dec 2017 14:36:44 +0530 Subject: [PATCH] elm: [atspi]enhance _accessible_at_point_top_down_get If there is only one valid child at point, then return it. The evas_tree_objects_at_xy_get could not find proper object, if application does not have well aligned objects. This could be a role of application, but this patch set could solve somehow. @tizen_fix orignal patch: b81db08d75d968f005810a892039e944dd517b0c Change-Id: I53f4077c8b5b89ce906147633034ada9652e45e0 --- src/lib/elementary/elm_widget.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 954a454..7f65f66 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -6577,6 +6577,17 @@ _accessible_at_point_top_down_get(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSE if (_is_inside(child, x, y)) valid_children = eina_list_append(valid_children, child); } + + /* If there is only one valid child at point, then return it. + The evas_tree_objects_at_xy_get could not find proper object, + if application does not have well aligned objects. */ + if (eina_list_count(valid_children) == 1) + { + eina_list_free(children); + child = eina_list_nth(valid_children, 0); + return child; + } + /* Get evas_object stacked at given x,y coordinates starting from top */ Eina_List *stack = evas_tree_objects_at_xy_get(evas_object_evas_get(obj), NULL, x, y); /* Foreach stacked object starting from top */ -- 2.7.4