Node *parent; //the parent of the tree
Eina_List *children; //this saves the original set of elements
Eina_List *saved_order;
+ Eina_Bool clean_apply; //set if there was no new registration after a "update_order" call
}tree;
struct _Graph_Node {
{
T(node).parent = parent;
T(parent).children = eina_list_append(T(parent).children, node);
+ T(parent).clean_apply = EINA_FALSE;
}
node->type = NODE_TYPE_ONLY_LOGICAL;
node->redirect_manager = redirect;
//mark dirty
dirty_add(obj, pd, node);
- //set again
- if (T(pnode).saved_order)
- {
- Eina_List *tmp;
-
- tmp = eina_list_clone(T(pnode).saved_order);
- efl_ui_focus_manager_calc_update_order(obj, parent, tmp);
- }
-
return EINA_TRUE;
}
ELM_SAFE_FREE(T(pnode).saved_order, eina_list_free);
T(pnode).saved_order = order;
+ T(pnode).clean_apply = EINA_TRUE;
//get all nodes from the subset
EINA_LIST_FOREACH(order, n, o)
eina_list_free(T(pnode).children);
T(pnode).children = eina_list_merge(node_order, not_ordered);
}
+ T(pnode).clean_apply = EINA_TRUE;
return;
}
static Node*
-_logical_movement(Efl_Ui_Focus_Manager_Calc_Data *pd EINA_UNUSED, Node *upper, Efl_Ui_Focus_Direction direction, Eina_Bool accept_logical)
+_logical_movement(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd EINA_UNUSED, Node *upper, Efl_Ui_Focus_Direction direction, Eina_Bool accept_logical)
{
Node* (*deliver)(Node *n);
Node *result;
stack = eina_list_append(stack, result);
if (direction == EFL_UI_FOCUS_DIRECTION_NEXT)
- efl_ui_focus_object_prepare_logical(result->focusable);
+ {
+ //set again
+ if (T(result).saved_order && !T(result).clean_apply)
+ {
+ Eina_List *tmp;
+
+ tmp = eina_list_clone(T(result).saved_order);
+ efl_ui_focus_manager_calc_update_order(obj, result->focusable, tmp);
+ }
+ efl_ui_focus_object_prepare_logical(result->focusable);
+ }
result = deliver(result);
if (accept_logical)
if (direction == EFL_UI_FOCUS_DIRECTION_PREVIOUS
|| direction == EFL_UI_FOCUS_DIRECTION_NEXT)
- dir = _logical_movement(pd, upper, direction, accept_logical);
+ dir = _logical_movement(obj, pd, upper, direction, accept_logical);
else
dir = _coords_movement(obj, pd, upper, direction);