bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=45f24b6ef4909c2d1142b22435cbecd4da96fd3d

commit 45f24b6ef4909c2d1142b22435cbecd4da96fd3d
Author: Derek Foreman <derek.foreman.sams...@gmail.com>
Date:   Tue Nov 20 11:20:36 2018 -0600

    elm: Compress more focus tests into the same list walk
    
    Since we're already at the top of the list, we can do the WIN_CLASS test
    much more cheaply.
    
    Differential Revision: https://phab.enlightenment.org/D7314
    
    Signed-off-by: Derek Foreman <derek.foreman.sams...@gmail.com>
---
 src/lib/elementary/efl_ui_widget.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index c9572d9b2e..8d2bdade73 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -364,18 +364,19 @@ _tree_custom_chain_missing(Eo *obj)
 }
 
 static Eina_Bool
-_tree_disabled_or_unfocusable(Eo *obj)
+_candidacy_exam(Eo *obj)
 {
-   Efl_Ui_Widget *wid = obj;
+   Efl_Ui_Widget *wid = obj, *top;
 
    do {
      ELM_WIDGET_DATA_GET(wid, wid_pd);
 
      if (wid_pd->disabled) return EINA_TRUE;
      if (wid_pd->tree_unfocusable) return EINA_TRUE;
+     top = wid;
    } while((wid = elm_widget_parent_get(wid)));
 
-   return EINA_FALSE;
+   return !efl_isa(top, EFL_UI_WIN_CLASS);
 }
 
 static void _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd);
@@ -485,8 +486,7 @@ _eval_registration_candidate(Eo *obj, Elm_Widget_Smart_Data 
*pd, Eina_Bool *shou
     //can focus can be overridden by the following properties
     if ((!pd->parent_obj) ||
         (!evas_object_visible_get(obj)) ||
-        !efl_isa(elm_widget_top_get(obj), EFL_UI_WIN_CLASS) ||
-        (_tree_disabled_or_unfocusable(obj)) ||
+        (_candidacy_exam(obj)) ||
         (_tree_custom_chain_missing(obj)))
       return;
 

-- 


Reply via email to