Add the code at the hooks call of E_COMP_OBJECT_HOOK_HIDE.
Change-Id: I4f9434ecee6b8fc64622e22a45bd54c00af0f608
static Eina_Bool
_focus_policy_history_hook_cb_comp_object_hide(void *data, E_Client *ec)
{
- // TODO:
+ E_Focus_Policy_History *history_policy;
+
+ history_policy = (E_Focus_Policy_History *)data;
+ if (!history_policy) return EINA_TRUE;
+
+ if (history_policy->focused_ec != ec) return EINA_TRUE;
+
+ /* ensure focus-out */
+ ELOGF("FOCUS", "focus unset | comp_object_hide ", ec);
+ e_client_frame_focus_set(ec, EINA_FALSE);
+ _e_focus_policy_history_focus_defer_unset(history_policy, ec);
return EINA_TRUE;
}