Add the code at the hooks call of E_COMP_OBJECT_HOOK_LOWER.
Change-Id: I576cde35c8ccf496f5d1b7b90e2066c21ab78402
static Eina_Bool
_focus_policy_hook_topmost_cb_comp_object_lower(void *data, E_Client *ec)
{
- // TODO:
+ E_Focus_Policy_Topmost *topmost_policy;
+
+ topmost_policy = (E_Focus_Policy_Topmost *)data;
+ if (!topmost_policy) return EINA_TRUE;
+
+ // no need to change the focused ec when ec is not focused.
+ if (!ec->focused) return EINA_TRUE;
+
+ // no need to change the focused ec when calc_vis_without_effect is not set.
+ if (e_config->calc_vis_without_effect) return EINA_TRUE;
+
+ // find the next focus and set it
+ _focus_policy_topmost_next_focus_set(topmost_policy);
return EINA_TRUE;
}