Eina_List *focus_stack;
Eina_List *defer_focus_stack;
+ struct
+ {
+ struct wl_signal focused_ec_changed;
+ } events;
+
struct wl_listener zone_client_add;
struct wl_listener zone_client_remove;
struct wl_listener zone_focus_clear;
static void set_focused_ec(E_Focus_Policy_History *history_policy, E_Client *ec)
{
atomic_store(&history_policy->focused_ec, ec);
+
+ wl_signal_emit_mutable(&history_policy->events.focused_ec_changed, ec);
}
static void
return EINA_TRUE;
}
+static void
+_focus_policy_history_focused_ec_changed_listener_add(E_Focus_Policy_Impl *impl, struct wl_listener *listener)
+{
+ E_Focus_Policy_History *history_policy;
+
+ history_policy = (E_Focus_Policy_History *)impl;
+ EINA_SAFETY_ON_NULL_RETURN(history_policy);
+
+ wl_signal_add(&history_policy->events.focused_ec_changed, listener);
+}
+
EINTERN E_Focus_Policy_Iface *
e_focus_policy_iface_history_new(E_Zone* zone)
{
history_policy->zone = zone;
+ wl_signal_init(&history_policy->events.focused_ec_changed);
+
E_FOCUS_HISTORY_TRACE(history_policy, NULL);
policy_iface->impl = (E_Focus_Policy_Impl *)history_policy;
policy_iface->del = _focus_policy_history_del;
policy_iface->focused_ec_get = _focus_policy_history_focused_ec_get;
policy_iface->update = _focus_policy_history_update;
+ policy_iface->focused_ec_changed_listener_add = _focus_policy_history_focused_ec_changed_listener_add;
// zone listeners
history_policy->zone_client_add.notify = _focus_policy_history_cb_zone_client_add;