From f5965d533c30a9dec1b072158ffc13dcb2d0a641 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 19 Apr 2013 13:49:34 +0100 Subject: [PATCH] add new event for comp win stacking --- src/bin/e_comp.c | 20 ++++++++++++++++---- src/bin/e_comp.h | 1 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 34b99c2d6..2daf7c760 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -43,6 +43,7 @@ EAPI int E_EVENT_COMP_SOURCE_VISIBILITY = -1; EAPI int E_EVENT_COMP_SOURCE_ADD = -1; EAPI int E_EVENT_COMP_SOURCE_DEL = -1; EAPI int E_EVENT_COMP_SOURCE_CONFIGURE = -1; +EAPI int E_EVENT_COMP_SOURCE_STACK = -1; static int _e_comp_log_dom = -1; @@ -150,6 +151,16 @@ _e_comp_event_source_configure(E_Comp_Win *cw) ecore_event_add(E_EVENT_COMP_SOURCE_CONFIGURE, ev, (Ecore_End_Cb)_e_comp_event_end, NULL); } +static void +_e_comp_event_source_stack(E_Comp_Win *cw) +{ + E_Event_Comp *ev; + + ev = E_NEW(E_Event_Comp, 1); + ev->cw = cw; + ecore_event_add(E_EVENT_COMP_SOURCE_STACK, ev, (Ecore_End_Cb)_e_comp_event_end, NULL); +} + static void _e_comp_child_show(E_Comp_Win *cw) { @@ -2666,7 +2677,7 @@ _e_comp_win_raise_above(E_Comp_Win *cw, E_Comp_Win *cw2) _e_comp_win_restack(cw); _e_comp_win_render_queue(cw); cw->pending_count++; - _e_comp_event_source_configure(cw); + _e_comp_event_source_stack(cw); } static void @@ -2679,7 +2690,7 @@ _e_comp_win_raise(E_Comp_Win *cw) _e_comp_win_restack(cw); _e_comp_win_render_queue(cw); cw->pending_count++; - _e_comp_event_source_configure(cw); + _e_comp_event_source_stack(cw); } static void @@ -2692,7 +2703,7 @@ _e_comp_win_lower_below(E_Comp_Win *cw, E_Comp_Win *cw2) _e_comp_win_restack(cw); _e_comp_win_render_queue(cw); cw->pending_count++; - _e_comp_event_source_configure(cw); + _e_comp_event_source_stack(cw); } static void @@ -2705,7 +2716,7 @@ _e_comp_win_lower(E_Comp_Win *cw) _e_comp_win_restack(cw); _e_comp_win_render_queue(cw); cw->pending_count++; - _e_comp_event_source_configure(cw); + _e_comp_event_source_stack(cw); } static void @@ -4802,6 +4813,7 @@ e_comp_init(void) E_EVENT_COMP_SOURCE_ADD = ecore_event_type_new(); E_EVENT_COMP_SOURCE_DEL = ecore_event_type_new(); E_EVENT_COMP_SOURCE_CONFIGURE = ecore_event_type_new(); + E_EVENT_COMP_SOURCE_STACK = ecore_event_type_new(); e_comp_cfdata_edd_init(&conf_edd, &conf_match_edd); conf = e_config_domain_load("e_comp", conf_edd); diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 786749fc7..9a49c7f6e 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -206,6 +206,7 @@ extern EAPI int E_EVENT_COMP_SOURCE_VISIBILITY; extern EAPI int E_EVENT_COMP_SOURCE_ADD; extern EAPI int E_EVENT_COMP_SOURCE_DEL; extern EAPI int E_EVENT_COMP_SOURCE_CONFIGURE; +extern EAPI int E_EVENT_COMP_SOURCE_STACK; typedef enum {