From 201723dfb82b192121348aaf24eb983126ba0ccd Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Fri, 29 Jun 2018 11:36:30 -0400 Subject: [PATCH] efl_ui_focus_manager_calc: only perform operation if really required 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index 65673bf..8ee4d99 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -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; -- 2.7.4