bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9c1c35b9b878243d1952f328c415860fde43f21f
commit 9c1c35b9b878243d1952f328c415860fde43f21f Author: Marcel Hollerbach <[email protected]> Date: Tue Nov 13 09:33:28 2018 +0100 elm_legacy: use the new api with using the new api of efl.ui.focus.object we can resolve a bug that was pointed out in P243. Differential Revision: https://phab.enlightenment.org/D7267 --- src/lib/elementary/elm_focus_legacy.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c index e3de5a97a6..15da74aadc 100644 --- a/src/lib/elementary/elm_focus_legacy.c +++ b/src/lib/elementary/elm_focus_legacy.c @@ -277,38 +277,12 @@ elm_object_focused_object_get(const Evas_Object *obj) EAPI Eina_Bool elm_object_focus_get(const Evas_Object *obj) { - Efl_Ui_Focus_Manager *m; - Efl_Ui_Focus_Object *focused_child; API_ENTRY_VAL(EINA_FALSE) if (!elm_widget_is(obj)) return evas_object_focus_get(obj); - m = efl_ui_focus_object_focus_manager_get(obj); - - //no manager means not registered - if (!m) return EINA_FALSE; - - //assertion: our redirect manager m is in the redirect chain - m = efl_ui_focus_object_focus_manager_get(obj); - - //if obj is the redriect manager its kind of focused - if (efl_ui_focus_manager_redirect_get(m) == obj) return EINA_TRUE; - - //if there is a redirect manager - if (!!efl_ui_focus_manager_redirect_get(m)) return EINA_FALSE; - - //now take the focused object and walk down the parents, if this is - focused_child = efl_ui_focus_manager_focus_get(m); - - while(focused_child) - { - if (focused_child == obj) return EINA_TRUE; - - focused_child = efl_ui_focus_object_focus_parent_get(focused_child); - } - - return efl_ui_focus_object_focus_get(obj); + return _elm_widget_top_win_focused_get(obj) && (efl_ui_focus_object_child_focus_get(obj) | efl_ui_focus_object_focus_get(obj)); } EAPI void --
