summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_interface_atspi_accessible.c
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2015-12-01 16:55:12 +0100
committerLukasz Stanislawski <l.stanislaws@samsung.com>2015-12-02 11:43:58 +0100
commitd1baa35b1ae5eaeed7c5b8d27e8609b64271882d (patch)
treea31722cef10615e6935cb7dd8694cf386228b569 /legacy/elementary/src/lib/elm_interface_atspi_accessible.c
parent0b1cfd791c8a2941721c88a288feea502f0b7fbe (diff)
atspi: always use widget's subobj as accessible children
Patch fixes issue when widgets could be orphaned in accessibility tree due to overloaded accessible_children_get methods in widgets returning Elm_Object_Items. Widgets like genlist, gengrid, list and toolbar returned only items as its accessibility children so if some widget was attached directly to those widgets (like ctxpopup/popup) it become orphaned in accessibility tree.
Diffstat (limited to '')
-rw-r--r--legacy/elementary/src/lib/elm_interface_atspi_accessible.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/legacy/elementary/src/lib/elm_interface_atspi_accessible.c b/legacy/elementary/src/lib/elm_interface_atspi_accessible.c
index 357e609f32..70f9488389 100644
--- a/legacy/elementary/src/lib/elm_interface_atspi_accessible.c
+++ b/legacy/elementary/src/lib/elm_interface_atspi_accessible.c
@@ -128,7 +128,6 @@ struct _Elm_Interface_Atspi_Accessible_Data
128 const char *description; 128 const char *description;
129 const char *translation_domain; 129 const char *translation_domain;
130 Elm_Atspi_Relation_Set relations; 130 Elm_Atspi_Relation_Set relations;
131 Elm_Interface_Atspi_Accessible *parent;
132 Elm_Atspi_Type type: 2; 131 Elm_Atspi_Type type: 2;
133}; 132};
134 133
@@ -167,13 +166,11 @@ _elm_interface_atspi_accessible_index_in_parent_get(Eo *obj, Elm_Interface_Atspi
167} 166}
168 167
169EOLIAN static Elm_Interface_Atspi_Accessible * 168EOLIAN static Elm_Interface_Atspi_Accessible *
170_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd) 169_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED)
171{ 170{
172 Elm_Atspi_Type type; 171 Elm_Atspi_Type type;
173 Eo *parent = obj; 172 Eo *parent = obj;
174 173
175 if (pd->parent) return pd->parent;
176
177 do { 174 do {
178 eo_do(obj, parent = eo_parent_get()); 175 eo_do(obj, parent = eo_parent_get());
179 if (eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN)) 176 if (eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
@@ -187,13 +184,10 @@ _elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Interface_At
187} 184}
188 185
189EOLIAN static void 186EOLIAN static void
190_elm_interface_atspi_accessible_parent_set(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED, Elm_Interface_Atspi_Accessible *new_parent) 187_elm_interface_atspi_accessible_parent_set(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED, Elm_Interface_Atspi_Accessible *new_parent EINA_UNUSED)
191{ 188{
192 if (pd->parent != new_parent) 189 WRN("The %s object does not implement the \"accessible_parent_set\" function.",
193 { 190 eo_class_name_get(eo_class_get(obj)));
194 pd->parent = new_parent;
195 elm_interface_atspi_accessible_parent_changed_signal_emit(obj);
196 }
197} 191}
198 192
199EOLIAN Eina_List* 193EOLIAN Eina_List*
@@ -587,8 +581,20 @@ _elm_interface_atspi_accessible_type_get(Eo *obj EINA_UNUSED, Elm_Interface_Atsp
587} 581}
588 582
589EOLIAN void 583EOLIAN void
590_elm_interface_atspi_accessible_type_set(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd, Elm_Atspi_Type val) 584_elm_interface_atspi_accessible_type_set(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd, Elm_Atspi_Type val)
591{ 585{
586 if (val == pd->type)
587 return;
588
589 switch (val)
590 {
591 case ELM_ATSPI_TYPE_DISABLED:
592 case ELM_ATSPI_TYPE_SKIPPED:
593 elm_interface_atspi_accessible_removed(obj);
594 break;
595 case ELM_ATSPI_TYPE_REGULAR:
596 elm_interface_atspi_accessible_added(obj);
597 }
592 pd->type = val; 598 pd->type = val;
593} 599}
594 600