From 73539151eb9b9e018e8f126e2df62c157e7c7759 Mon Sep 17 00:00:00 2001 From: Lukasz Stanislawski Date: Wed, 16 Sep 2015 16:06:02 +0200 Subject: [PATCH] flat_navi: remove from context objects that are controlled. This patch removes from context all objects that have CONTROLLED_BY relation set. According to atspi docs this relation states that such objects have it state, appearance and functionality triggered/modified by other objects. Change-Id: I1f6614d20a7de0ef45fdcd44346d398313acd96f --- src/flat_navi.c | 9 +++++++++ tests/atspi/atspi.h | 25 ++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/flat_navi.c b/src/flat_navi.c index 259f315..9d7cc76 100644 --- a/src/flat_navi.c +++ b/src/flat_navi.c @@ -183,6 +183,15 @@ static Eina_Bool _accept_object(AtspiAccessible * obj) break; } + // When given accessibility object is controlled by other object we consider + // it as not "user-presentable" on and skip it in navigation tree + AtspiAccessible *relation = _get_object_in_relation(obj, ATSPI_RELATION_CONTROLLED_BY); + if (relation) + { + g_object_unref(relation); + return EINA_FALSE; + } + ss = atspi_accessible_get_state_set(obj); if (ss) { if (_object_is_item(obj)) { diff --git a/tests/atspi/atspi.h b/tests/atspi/atspi.h index 3271b19..e03f548 100644 --- a/tests/atspi/atspi.h +++ b/tests/atspi/atspi.h @@ -236,11 +236,26 @@ typedef enum typedef enum { - ATSPI_RELATION_NULL, - ATSPI_RELATION_LABEL_FOR, - ATSPI_RELATION_LABELLED_BY, - ATSPI_RELATION_FLOWS_TO, - ATSPI_RELATION_FLOWS_FROM + ATSPI_RELATION_NULL, + ATSPI_RELATION_LABEL_FOR, + ATSPI_RELATION_LABELLED_BY, + ATSPI_RELATION_CONTROLLER_FOR, + ATSPI_RELATION_CONTROLLED_BY, + ATSPI_RELATION_MEMBER_OF, + ATSPI_RELATION_TOOLTIP_FOR, + ATSPI_RELATION_NODE_CHILD_OF, + ATSPI_RELATION_NODE_PARENT_OF, + ATSPI_RELATION_EXTENDED, + ATSPI_RELATION_FLOWS_TO, + ATSPI_RELATION_FLOWS_FROM, + ATSPI_RELATION_SUBWINDOW_OF, + ATSPI_RELATION_EMBEDS, + ATSPI_RELATION_EMBEDDED_BY, + ATSPI_RELATION_POPUP_FOR, + ATSPI_RELATION_PARENT_WINDOW_OF, + ATSPI_RELATION_DESCRIPTION_FOR, + ATSPI_RELATION_DESCRIBED_BY, + ATSPI_RELATION_LAST_DEFINED, } AtspiRelationType; struct _AtspiApplication -- 2.7.4