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
This commit is contained in:
Marcel Hollerbach 2018-06-29 11:36:30 -04:00 committed by Mike Blumenkrantz
parent 8f7170bfad
commit 1730d95896
1 changed files with 3 additions and 2 deletions

View 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;