efl_ui_focus_manager: make active getter work correctly

focus managers can be used via composition, in this case the normal
manager is NOT inheriting from the
EFL_UI_FOCUS_MANAGER_WINDOW_ROOT_INTERFACE class, but the composition
parent is.

fix T7390

Differential Revision: https://phab.enlightenment.org/D7230
This commit is contained in:
Marcel Hollerbach 2018-11-02 02:13:48 +01:00
parent 1a17f41584
commit c0e52526c6
1 changed files with 3 additions and 1 deletions

View File

@ -94,7 +94,9 @@ _focus_manager_active_get(Eo *obj)
{
Eo *root, *manager, *comp_parent, *redirect;
if (efl_isa(obj, EFL_UI_FOCUS_MANAGER_WINDOW_ROOT_INTERFACE)) return EINA_TRUE;
if (efl_isa(obj, EFL_UI_FOCUS_MANAGER_WINDOW_ROOT_INTERFACE) ||
(efl_composite_part_is(obj) && efl_isa(efl_parent_get(obj), EFL_UI_FOCUS_MANAGER_WINDOW_ROOT_INTERFACE)))
return EINA_TRUE;
root = efl_ui_focus_manager_root_get(obj);
manager = efl_ui_focus_object_focus_manager_get(root);