efl_ui_focus_manager_calc: remove needless check for normal node
authorYeongJong Lee <yj34.lee@samsung.com>
Thu, 12 Apr 2018 12:35:38 +0000 (14:35 +0200)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 28 May 2018 10:26:02 +0000 (19:26 +0900)
Summary:
a node in focus stack is always normal node. we don't need to check whether
node is normal.

see also, 97ec48434f59c18c5fb60a9f9eed394c82fb5f91

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5930

src/lib/elementary/efl_ui_focus_manager_calc.c

index 3f1bf4a..e22b801 100644 (file)
@@ -334,24 +334,6 @@ _focus_stack_unfocus_last(Efl_Ui_Focus_Manager_Calc_Data *pd)
    return focusable;
 }
 
-static Node*
-_focus_stack_last_regular(Efl_Ui_Focus_Manager_Calc_Data *pd)
-{
-   Eina_List *l;
-   Node *upper;
-
-   l = eina_list_last(pd->focus_stack);
-   upper = eina_list_last_data_get(pd->focus_stack);
-
-   while (upper && upper->type != NODE_TYPE_NORMAL)
-     {
-        l = eina_list_prev(l);
-        upper = eina_list_data_get(l);
-     }
-
-   return upper;
-}
-
 //CALCULATING STUFF
 
 static inline int
@@ -1465,7 +1447,7 @@ _request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Fo
    Node *dir = NULL;
 
    if (!upper)
-     upper = _focus_stack_last_regular(pd);
+     upper = eina_list_last_data_get(pd->focus_stack);
 
    if (!upper)
      {