From 3c7fab995cc88e11afc7fddbb3836d427a043bb1 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 7 Jul 2014 13:42:47 -0400 Subject: [PATCH] +e_client_layout_cb_set() let's keep client hooks for clients. --- src/bin/e_client.c | 14 ++++++++++++++ src/bin/e_client.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index af66e8941..efe4e45a2 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -51,6 +51,8 @@ static Ecore_Event_Handler *action_handler_mouse = NULL; static Ecore_Timer *action_timer = NULL; static Eina_Rectangle action_orig = {0}; +static E_Client_Layout_Cb _e_client_layout_cb = NULL; + EINTERN void e_client_focused_set(E_Client *ec); static Eina_Inlist *_e_client_hooks[] = @@ -2227,6 +2229,8 @@ e_client_idler_before(void) } } + if (_e_client_layout_cb) + _e_client_layout_cb(c); // pass 3 - hide windows needing hide and eval (main eval) E_CLIENT_FOREACH(c, ec) @@ -4695,3 +4699,13 @@ e_client_is_stacking(const E_Client *ec) { return ec->comp->layers[e_comp_canvas_layer_map(ec->layer)].obj == ec->frame; } + +//////////////////////////////////////////// + +EAPI void +e_client_layout_cb_set(E_Client_Layout_Cb cb) +{ + if (_e_client_layout_cb && cb) + CRI("ATTEMPTING TO OVERWRITE EXISTING CLIENT LAYOUT HOOK!!!"); + _e_client_layout_cb = cb; +} diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 7f08e8bc6..a19ccf7bb 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -169,6 +169,7 @@ typedef enum _E_Client_Hook_Point typedef void (*E_Client_Move_Intercept_Cb)(E_Client *, int x, int y); typedef void (*E_Client_Hook_Cb)(void *data, E_Client *ec); +typedef void (*E_Client_Layout_Cb)(void * /* E_Comp */); //< can't use real type because of include order #else #define E_CLIENT_TYPE (int)0xE0b01002 @@ -812,5 +813,7 @@ EAPI void e_client_redirected_set(E_Client *ec, Eina_Bool set); EAPI Eina_Bool e_client_is_stacking(const E_Client *ec); EAPI Eina_Bool e_client_desk_window_profile_available_check(E_Client *ec, const char *profile); EAPI void e_client_desk_window_profile_wait_desk_set(E_Client *ec, E_Desk *desk); +EAPI void e_client_layout_cb_set(E_Client_Layout_Cb cb); + #include "e_client.x" #endif