From 6e282868933265be2bc2a73de45e7a94bb67c719 Mon Sep 17 00:00:00 2001 From: Bartlomiej Uliasz Date: Wed, 23 Sep 2015 13:01:26 +0200 Subject: [PATCH] Fix for _accept_object function: disabled extents check for list items Change-Id: Ia503deba315339febf03c19005b0b685090e2894 Signed-off-by: Bartlomiej Uliasz --- src/flat_navi.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/flat_navi.c b/src/flat_navi.c index 3a3abe1..df2e80a 100644 --- a/src/flat_navi.c +++ b/src/flat_navi.c @@ -194,16 +194,6 @@ static Eina_Bool _accept_object(AtspiAccessible * obj) return EINA_FALSE; } - /* Extent of candidate object could be 0 */ - component = atspi_accessible_get_component_iface(obj); - extent = atspi_component_get_extents(component, ATSPI_COORD_TYPE_SCREEN, NULL); - - if (extent->width <= 0 || extent->height <= 0) { - g_free(extent); - return EINA_FALSE; - } - g_free(extent); - ss = atspi_accessible_get_state_set(obj); if (ss) { if (_object_is_item(obj)) { @@ -215,10 +205,23 @@ static Eina_Bool _accept_object(AtspiAccessible * obj) ret = atspi_state_set_contains(pss, ATSPI_STATE_SHOWING) && atspi_state_set_contains(pss, ATSPI_STATE_VISIBLE) && !_is_collapsed(pss); DEBUG("ITEM HAS SHOWING && VISIBLE && NOT COLLAPSED PARENT %d", ret); g_object_unref(pss); + g_object_unref(ss); return ret; } } } else { + /* Extent of candidate object could be 0 */ + component = atspi_accessible_get_component_iface(obj); + extent = atspi_component_get_extents(component, ATSPI_COORD_TYPE_SCREEN, NULL); + g_object_unref(component); + + if (extent->width <= 0 || extent->height <= 0) { + g_free(extent); + g_object_unref(ss); + return EINA_FALSE; + } + g_free(extent); + ret = atspi_state_set_contains(ss, ATSPI_STATE_SHOWING) && atspi_state_set_contains(ss, ATSPI_STATE_VISIBLE); } g_object_unref(ss); -- 2.7.4