summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-14 11:29:05 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-04-14 11:29:05 -0400
commit728fd911ea489949c6627a589efbbd86d9a444dd (patch)
treeeefe17554ab5fa4086f248cf8eab5d65823ca802
parent63e5216951b5c0e78f8cfdb8d046647dfcf91acf (diff)
efl_ui_focus_manager: refactor _request_subchild_except
Summary: this is more usefull with a focusable and not a node, since the node can be already freed in some cases. ref D11667 Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11669
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 9c104ab7a9..b2342c6a13 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -776,10 +776,10 @@ _efl_ui_focus_manager_calc_update_children(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Man
776} 776}
777 777
778static inline Node* 778static inline Node*
779_request_subchild_except(Node *n, Node *except) 779_request_subchild_except(Node *n, Eo *except)
780{ 780{
781 n = _request_subchild(n); 781 n = _request_subchild(n);
782 while (n == except) 782 while (n && n->focusable == except)
783 { 783 {
784 n = _next(n); 784 n = _next(n);
785 } 785 }
@@ -810,7 +810,7 @@ _efl_ui_focus_manager_calc_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_
810 { 810 {
811 n = eina_list_nth(pd->focus_stack, eina_list_count(pd->focus_stack) - 2); 811 n = eina_list_nth(pd->focus_stack, eina_list_count(pd->focus_stack) - 2);
812 if (!n) 812 if (!n)
813 n = _request_subchild_except(pd->root, node); 813 n = _request_subchild_except(pd->root, node->focusable);
814 814
815 if (n) 815 if (n)
816 efl_ui_focus_manager_focus_set(obj, n->focusable); 816 efl_ui_focus_manager_focus_set(obj, n->focusable);
@@ -1998,7 +1998,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_pop_history_stack(Eo *obj EINA_U
1998 } 1998 }
1999 else 1999 else
2000 { 2000 {
2001 last = _request_subchild_except(pd->root, node_get(obj, pd, last_focusable)); 2001 last = _request_subchild_except(pd->root, last_focusable);
2002 if (last) 2002 if (last)
2003 efl_ui_focus_manager_focus_set(obj, last->focusable); 2003 efl_ui_focus_manager_focus_set(obj, last->focusable);
2004 } 2004 }