summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-12 16:15:59 +0900
committerHermet Park <hermetpark@gmail.com>2018-07-12 16:15:59 +0900
commita62420ce36c38a85433c22185ed5dec9ce73e398 (patch)
tree1fc9e3260b8dd8d76f6630429138c51034854d47
parent6a68e51460b51554e68c79d1c97325b4dd97eb83 (diff)
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
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 8ee4d99dca..076874f354 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -453,11 +453,11 @@ EFL_CALLBACKS_ARRAY_DEFINE(logical_node,
453//============================= 453//=============================
454 454
455static Node* 455static Node*
456_register(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Focus_Object *child, Node *parent) 456_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)
457{ 457{
458 Node *node; 458 Node *node;
459 node = eina_hash_find(pd->node_hash, &child); 459 node = eina_hash_find(pd->node_hash, &child);
460 if (node) 460 if (node && !(node->type == type && T(node).parent == parent && node->redirect_manager == redirect))
461 { 461 {
462 ERR("Child %p is already registered in the graph (%s)", child, node->type == NODE_TYPE_ONLY_LOGICAL ? "logical" : "regular"); 462 ERR("Child %p is already registered in the graph (%s)", child, node->type == NODE_TYPE_ONLY_LOGICAL ? "logical" : "regular");
463 return NULL; 463 return NULL;
@@ -472,6 +472,8 @@ _register(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Focus_Object *chil
472 T(node).parent = parent; 472 T(node).parent = parent;
473 T(parent).children = eina_list_append(T(parent).children, node); 473 T(parent).children = eina_list_append(T(parent).children, node);
474 } 474 }
475 node->type = NODE_TYPE_ONLY_LOGICAL;
476 node->redirect_manager = redirect;
475 477
476 return node; 478 return node;
477} 479}
@@ -492,15 +494,12 @@ _efl_ui_focus_manager_calc_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Calc_D
492 pnode = node_get(obj, pd, parent); 494 pnode = node_get(obj, pd, parent);
493 if (!pnode) return EINA_FALSE; 495 if (!pnode) return EINA_FALSE;
494 496
495 node = _register(obj, pd, child, pnode); 497 node = _register(obj, pd, child, pnode, NODE_TYPE_ONLY_LOGICAL, redirect);
496 if (!node) return EINA_FALSE; 498 if (!node) return EINA_FALSE;
497 499
498 //listen to deletion 500 //listen to deletion
499 efl_event_callback_array_add(child, logical_node(), obj); 501 efl_event_callback_array_add(child, logical_node(), obj);
500 502
501 node->type = NODE_TYPE_ONLY_LOGICAL;
502 node->redirect_manager = redirect;
503
504 //set again 503 //set again
505 if (T(pnode).saved_order) 504 if (T(pnode).saved_order)
506 { 505 {
@@ -531,7 +530,7 @@ _efl_ui_focus_manager_calc_register(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd,
531 pnode = node_get(obj, pd, parent); 530 pnode = node_get(obj, pd, parent);
532 if (!pnode) return EINA_FALSE; 531 if (!pnode) return EINA_FALSE;
533 532
534 node = _register(obj, pd, child, pnode); 533 node = _register(obj, pd, child, pnode, NODE_TYPE_NORMAL, redirect);
535 if (!node) return EINA_FALSE; 534 if (!node) return EINA_FALSE;
536 535
537 //listen to changes 536 //listen to changes
@@ -1533,8 +1532,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_root_set(Eo *obj EINA_UNUSED, Ef
1533 return EINA_FALSE; 1532 return EINA_FALSE;
1534 } 1533 }
1535 1534
1536 node = _register(obj, pd, root, NULL); 1535 node = _register(obj, pd, root, NULL, NODE_TYPE_ONLY_LOGICAL, NULL);
1537 node->type = NODE_TYPE_ONLY_LOGICAL;
1538 1536
1539 pd->root = node; 1537 pd->root = node;
1540 1538