bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7e227161b97605a12dd5bcae374738f02d7be70c
commit 7e227161b97605a12dd5bcae374738f02d7be70c Author: Marcel Hollerbach <[email protected]> Date: Wed Nov 15 12:21:51 2017 +0100 efl_ui_focus_manager_calc: correct handle focus when redirects are set so we dont have two focused elements --- src/lib/elementary/efl_ui_focus_manager_calc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index 851feebba3..1ed0f02e30 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -892,6 +892,25 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Foc efl_ui_focus_manager_reset_history(old_manager); + //adjust focus property of the most upper element + { + Node *n = NULL; + Eina_List *last; + /* focus the upper most element */ + last = eina_list_last(pd->focus_stack); + + if (last) + n = eina_list_data_get(last); + + if (n) + { + if (!pd->redirect && old_manager) + efl_ui_focus_object_focus_set(n->focusable, EINA_TRUE); + else if (pd->redirect && !old_manager) + efl_ui_focus_object_focus_set(n->focusable, EINA_FALSE); + } + } + efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED , old_manager); } --
