forked from enlightenment/enlightenment
update contact/illume to not use broken/removed layout client hook
This commit is contained in:
parent
3c7fab995c
commit
1a11067c32
|
@ -6,7 +6,7 @@ static Eina_Bool _cb_event_focus_in(void *data __UNUSED__, int type __UNUSED__,
|
||||||
static Eina_Bool _cb_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event);
|
static Eina_Bool _cb_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||||
static void _cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec);
|
static void _cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec);
|
||||||
static void _cb_hook_post_assign(void *data __UNUSED__, E_Client *ec);
|
static void _cb_hook_post_assign(void *data __UNUSED__, E_Client *ec);
|
||||||
static void _cb_hook_layout(void *data __UNUSED__, E_Comp *comp);
|
static void _cb_hook_layout(E_Comp *comp);
|
||||||
|
|
||||||
static Eina_List *hooks = NULL;
|
static Eina_List *hooks = NULL;
|
||||||
static Eina_List *handlers = NULL;
|
static Eina_List *handlers = NULL;
|
||||||
|
@ -25,8 +25,6 @@ e_policy_init(void)
|
||||||
_cb_hook_post_fetch, NULL));
|
_cb_hook_post_fetch, NULL));
|
||||||
LADD(hooks, e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN,
|
LADD(hooks, e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN,
|
||||||
_cb_hook_post_assign, NULL));
|
_cb_hook_post_assign, NULL));
|
||||||
LADD(hooks, e_client_hook_add(E_CLIENT_HOOK_CANVAS_LAYOUT,
|
|
||||||
(E_Client_Hook_Cb)_cb_hook_layout, NULL));
|
|
||||||
LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_ADD,
|
LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_ADD,
|
||||||
_cb_event_add, NULL));
|
_cb_event_add, NULL));
|
||||||
LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
|
LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
|
||||||
|
@ -35,6 +33,7 @@ e_policy_init(void)
|
||||||
_cb_event_focus_in, NULL));
|
_cb_event_focus_in, NULL));
|
||||||
LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT,
|
LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT,
|
||||||
_cb_event_focus_out, NULL));
|
_cb_event_focus_out, NULL));
|
||||||
|
e_client_layout_cb_set((E_Client_Layout_Cb)_cb_hook_layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -45,6 +44,7 @@ e_policy_shutdown(void)
|
||||||
|
|
||||||
EINA_LIST_FREE(hooks, bh) e_client_hook_del(bh);
|
EINA_LIST_FREE(hooks, bh) e_client_hook_del(bh);
|
||||||
EINA_LIST_FREE(handlers, eh) ecore_event_handler_del(eh);
|
EINA_LIST_FREE(handlers, eh) ecore_event_handler_del(eh);
|
||||||
|
e_client_layout_cb_set(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -166,7 +166,7 @@ _cb_hook_post_assign(void *data __UNUSED__, E_Client *ec)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cb_hook_layout(void *data __UNUSED__, E_Comp *comp)
|
_cb_hook_layout(E_Comp *comp)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Client *ec, *kbd = NULL;;
|
E_Client *ec, *kbd = NULL;;
|
||||||
|
@ -174,8 +174,6 @@ _cb_hook_layout(void *data __UNUSED__, E_Comp *comp)
|
||||||
Eina_Bool have_focused = EINA_FALSE;
|
Eina_Bool have_focused = EINA_FALSE;
|
||||||
int kx = 0, ky = 0, kw = 0, kh = 0;
|
int kx = 0, ky = 0, kw = 0, kh = 0;
|
||||||
|
|
||||||
if (!comp) return;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(comp->clients, l, ec)
|
EINA_LIST_FOREACH(comp->clients, l, ec)
|
||||||
{
|
{
|
||||||
if (e_client_util_ignored_get(ec)) continue;
|
if (e_client_util_ignored_get(ec)) continue;
|
||||||
|
|
|
@ -18,7 +18,7 @@ static Eina_Bool _e_mod_policy_cb_window_property(void *data __UNUSED__, int typ
|
||||||
static Eina_Bool _e_mod_policy_cb_policy_change(void *data __UNUSED__, int type, void *event __UNUSED__);
|
static Eina_Bool _e_mod_policy_cb_policy_change(void *data __UNUSED__, int type, void *event __UNUSED__);
|
||||||
static void _e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec);
|
static void _e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec);
|
||||||
static void _e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, E_Client *ec);
|
static void _e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, E_Client *ec);
|
||||||
static void _e_mod_policy_cb_hook_layout(void *data __UNUSED__, E_Comp *comp);
|
static void _e_mod_policy_cb_hook_layout(E_Comp *comp);
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
static E_Illume_Policy *_policy = NULL;
|
static E_Illume_Policy *_policy = NULL;
|
||||||
|
@ -105,6 +105,7 @@ e_mod_policy_shutdown(void)
|
||||||
/* remove the border hooks */
|
/* remove the border hooks */
|
||||||
EINA_LIST_FREE(_policy_hooks, hook)
|
EINA_LIST_FREE(_policy_hooks, hook)
|
||||||
e_client_hook_del(hook);
|
e_client_hook_del(hook);
|
||||||
|
e_client_layout_cb_set(NULL);
|
||||||
|
|
||||||
/* destroy the policy if it exists */
|
/* destroy the policy if it exists */
|
||||||
if (_policy) e_object_del(E_OBJECT(_policy));
|
if (_policy) e_object_del(E_OBJECT(_policy));
|
||||||
|
@ -278,10 +279,7 @@ _e_mod_policy_hooks_add(void)
|
||||||
eina_list_append(_policy_hooks,
|
eina_list_append(_policy_hooks,
|
||||||
e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN,
|
e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN,
|
||||||
_e_mod_policy_cb_hook_post_assign, NULL));
|
_e_mod_policy_cb_hook_post_assign, NULL));
|
||||||
_policy_hooks =
|
e_client_layout_cb_set((E_Client_Layout_Cb)_e_mod_policy_cb_hook_layout);
|
||||||
eina_list_append(_policy_hooks,
|
|
||||||
e_client_hook_add(E_CLIENT_HOOK_CANVAS_LAYOUT,
|
|
||||||
(E_Client_Hook_Cb)_e_mod_policy_cb_hook_layout, NULL));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -506,7 +504,7 @@ _e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, E_Client *ec)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_mod_policy_cb_hook_layout(void *data __UNUSED__, E_Comp *comp)
|
_e_mod_policy_cb_hook_layout(E_Comp *comp)
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
|
|
Loading…
Reference in New Issue