forked from enlightenment/efl
efl_ui_focus_manager_calc: do not error when the configuraiton is equal
Summary: Before this was erroring. However, this error was not reporting a bad situation, thus there is no need to error. This patch fixes errors on the Popup test when scrollable is set to 1. Reviewers: devilhorns, zmike Reviewed By: zmike Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6560
This commit is contained in:
parent
6a68e51460
commit
a62420ce36
|
@ -453,11 +453,11 @@ EFL_CALLBACKS_ARRAY_DEFINE(logical_node,
|
||||||
//=============================
|
//=============================
|
||||||
|
|
||||||
static Node*
|
static Node*
|
||||||
_register(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Focus_Object *child, Node *parent)
|
_register(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Focus_Object *child, Node *parent, Node_Type type, Efl_Ui_Focus_Manager *redirect)
|
||||||
{
|
{
|
||||||
Node *node;
|
Node *node;
|
||||||
node = eina_hash_find(pd->node_hash, &child);
|
node = eina_hash_find(pd->node_hash, &child);
|
||||||
if (node)
|
if (node && !(node->type == type && T(node).parent == parent && node->redirect_manager == redirect))
|
||||||
{
|
{
|
||||||
ERR("Child %p is already registered in the graph (%s)", child, node->type == NODE_TYPE_ONLY_LOGICAL ? "logical" : "regular");
|
ERR("Child %p is already registered in the graph (%s)", child, node->type == NODE_TYPE_ONLY_LOGICAL ? "logical" : "regular");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -472,6 +472,8 @@ _register(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Focus_Object *chil
|
||||||
T(node).parent = parent;
|
T(node).parent = parent;
|
||||||
T(parent).children = eina_list_append(T(parent).children, node);
|
T(parent).children = eina_list_append(T(parent).children, node);
|
||||||
}
|
}
|
||||||
|
node->type = NODE_TYPE_ONLY_LOGICAL;
|
||||||
|
node->redirect_manager = redirect;
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
@ -492,15 +494,12 @@ _efl_ui_focus_manager_calc_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Calc_D
|
||||||
pnode = node_get(obj, pd, parent);
|
pnode = node_get(obj, pd, parent);
|
||||||
if (!pnode) return EINA_FALSE;
|
if (!pnode) return EINA_FALSE;
|
||||||
|
|
||||||
node = _register(obj, pd, child, pnode);
|
node = _register(obj, pd, child, pnode, NODE_TYPE_ONLY_LOGICAL, redirect);
|
||||||
if (!node) return EINA_FALSE;
|
if (!node) return EINA_FALSE;
|
||||||
|
|
||||||
//listen to deletion
|
//listen to deletion
|
||||||
efl_event_callback_array_add(child, logical_node(), obj);
|
efl_event_callback_array_add(child, logical_node(), obj);
|
||||||
|
|
||||||
node->type = NODE_TYPE_ONLY_LOGICAL;
|
|
||||||
node->redirect_manager = redirect;
|
|
||||||
|
|
||||||
//set again
|
//set again
|
||||||
if (T(pnode).saved_order)
|
if (T(pnode).saved_order)
|
||||||
{
|
{
|
||||||
|
@ -531,7 +530,7 @@ _efl_ui_focus_manager_calc_register(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd,
|
||||||
pnode = node_get(obj, pd, parent);
|
pnode = node_get(obj, pd, parent);
|
||||||
if (!pnode) return EINA_FALSE;
|
if (!pnode) return EINA_FALSE;
|
||||||
|
|
||||||
node = _register(obj, pd, child, pnode);
|
node = _register(obj, pd, child, pnode, NODE_TYPE_NORMAL, redirect);
|
||||||
if (!node) return EINA_FALSE;
|
if (!node) return EINA_FALSE;
|
||||||
|
|
||||||
//listen to changes
|
//listen to changes
|
||||||
|
@ -1533,8 +1532,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_root_set(Eo *obj EINA_UNUSED, Ef
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = _register(obj, pd, root, NULL);
|
node = _register(obj, pd, root, NULL, NODE_TYPE_ONLY_LOGICAL, NULL);
|
||||||
node->type = NODE_TYPE_ONLY_LOGICAL;
|
|
||||||
|
|
||||||
pd->root = node;
|
pd->root = node;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue