diff --git a/src/bin/e_client.c b/src/bin/e_client.c index af66e8941..ec7b2a46b 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -77,6 +77,7 @@ static Eina_Inlist *_e_client_hooks[] = [E_CLIENT_HOOK_DEL] = NULL, [E_CLIENT_HOOK_UNREDIRECT] = NULL, [E_CLIENT_HOOK_REDIRECT] = NULL, + [E_CLIENT_HOOK_CANVAS_LAYOUT] = NULL, }; /////////////////////////////////////////// @@ -324,6 +325,24 @@ _e_client_hook_call(E_Client_Hook_Point hookpoint, E_Client *ec) return !!e_object_unref(E_OBJECT(ec)); } +static Eina_Bool +_e_client_hook_comp_call(E_Client_Hook_Point hookpoint, E_Comp *c) +{ + E_Client_Hook *ch; + + _e_client_hooks_walking++; + _e_client_hooks_walking++; + EINA_INLIST_FOREACH(_e_client_hooks[hookpoint], ch) + { + if (ch->delete_me) continue; + ch->func(ch->data, (void *)c); + } + _e_client_hooks_walking--; + if ((_e_client_hooks_walking == 0) && (_e_client_hooks_delete > 0)) + _e_client_hooks_clean(); + return EINA_TRUE; +} + /////////////////////////////////////////// static void @@ -2206,6 +2225,16 @@ e_client_idler_before(void) _e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec); } + // layout hook - this is where a hook gets to figure out what to + // do if anything. + // + // XXX: FIXME - keep this until there is an acceptable replacement + // that can allow layout policie modules to evaluate everything + // at a single point after everything else is done as removing this + // breaks both illume2 and contact ... which didn't get updated to + // have an alternative method implemented + _e_client_hook_comp_call(E_CLIENT_HOOK_CANVAS_LAYOUT, c); + E_CLIENT_FOREACH(c, ec) { // pass 2 - show windows needing show diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 7f08e8bc6..2fec6e158 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -164,6 +164,7 @@ typedef enum _E_Client_Hook_Point E_CLIENT_HOOK_DEL, E_CLIENT_HOOK_UNREDIRECT, E_CLIENT_HOOK_REDIRECT, + E_CLIENT_HOOK_CANVAS_LAYOUT, E_CLIENT_HOOK_LAST, } E_Client_Hook_Point;