aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2018-04-25 13:29:26 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-04-30 15:22:52 +0200
commitbd9b112094fd8efdae0d01c4db6a3f1abc711d5b (patch)
treea3d6fe0976e20f1b9aed15f0a7bc0d36ca41ac7c
parentelm_widget_item_static_focus: prepare the item not the widget (diff)
downloadefl-bd9b112094fd8efdae0d01c4db6a3f1abc711d5b.tar.gz
efl_ui_focus_manager_calc: make the preparation call tree style
So we make sure that all children are prepared.
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 1d9bd1b5de..6845e1195b 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -1175,21 +1175,30 @@ _iterator_free(Border_Elements_Iterator *it)
free(it);
}
+static void
+_prepare_node(Node *root)
+{
+ Eina_List *n;
+ Node *node;
+
+ efl_ui_focus_object_prepare_logical(root->focusable);
+
+ EINA_LIST_FOREACH(root->tree.children, n, node)
+ {
+ _prepare_node(node);
+ }
+}
+
EOLIAN static Eina_Iterator*
_efl_ui_focus_manager_calc_efl_ui_focus_manager_border_elements_get(const Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd)
{
Border_Elements_Iterator *it;
- Node *n;
/* XXX const */
dirty_flush_all((Eo *)obj, pd);
- Eina_Iterator *elements = eina_hash_iterator_data_new(pd->node_hash);
- EINA_ITERATOR_FOREACH(elements, n)
- {
- efl_ui_focus_object_prepare_logical(n->focusable);
- }
- eina_iterator_free(elements);
+ //now call prepare on every node
+ _prepare_node(pd->root);
it = calloc(1, sizeof(Border_Elements_Iterator));