zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=728fd911ea489949c6627a589efbbd86d9a444dd

commit 728fd911ea489949c6627a589efbbd86d9a444dd
Author: Marcel Hollerbach <[email protected]>
Date:   Tue Apr 14 11:29:05 2020 -0400

    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
---
 src/lib/elementary/efl_ui_focus_manager_calc.c | 8 ++++----
 1 file 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
 }
 
 static inline Node*
-_request_subchild_except(Node *n, Node *except)
+_request_subchild_except(Node *n, Eo *except)
 {
    n = _request_subchild(n);
-   while (n == except)
+   while (n && n->focusable == except)
      {
         n = _next(n);
      }
@@ -810,7 +810,7 @@ _efl_ui_focus_manager_calc_unregister(Eo *obj EINA_UNUSED, 
Efl_Ui_Focus_Manager_
                {
                   n = eina_list_nth(pd->focus_stack, 
eina_list_count(pd->focus_stack) - 2);
                   if (!n)
-                    n = _request_subchild_except(pd->root, node);
+                    n = _request_subchild_except(pd->root, node->focusable);
 
                   if (n)
                     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
     }
   else
     {
-       last = _request_subchild_except(pd->root, node_get(obj, pd, 
last_focusable));
+       last = _request_subchild_except(pd->root, last_focusable);
        if (last)
          efl_ui_focus_manager_focus_set(obj, last->focusable);
     }

-- 


Reply via email to