efl_ui_focus_manager_calc: only perform operation if really required
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Fri, 29 Jun 2018 15:36:30 +0000 (11:36 -0400)
committerBowon Ryu <bowon.ryu@samsung.com>
Wed, 4 Jul 2018 05:15:44 +0000 (14:15 +0900)
Summary:
_manager_in_chain_set is not needed to be called if the focus property
is already correct. If a manager is moved out of the redirect property,
then the focus is dropped completly

Reviewers: ManMower, devilhorns, zmike, stephenmhouston

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

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

src/lib/elementary/efl_ui_focus_manager_calc.c

index 65673bf..8ee4d99 100644 (file)
@@ -1310,8 +1310,6 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set(Eo *obj, Efl_U
 
    F_DBG("Manager: %p focusing object %p %s", obj, node->focusable, efl_class_name_get(node->focusable));
 
-   //make sure this manager is in the chain of redirects
-   _manager_in_chain_set(obj, pd);
 
    if (eina_list_last_data_get(pd->focus_stack) == node)
      {
@@ -1320,6 +1318,9 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set(Eo *obj, Efl_U
           return;
      }
 
+   //make sure this manager is in the chain of redirects
+   _manager_in_chain_set(obj, pd);
+
    node_type = node->type;
    new_focusable = node->focusable;