diff options
author | discomfitor <michael.blumenkrantz@gmail.com> | 2013-10-14 18:52:49 +0100 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2014-01-13 01:14:15 -0500 |
commit | 39c28a7441a55d53a41c6a3bd3ff2dae8e087453 (patch) | |
tree | 6535a2fb1c651d9a6730c4d9175555165b01f552 | |
parent | d0bf9c3f2ff08d43f88623d6544833c7b4d84acf (diff) | |
download | enlightenment-39c28a7441a55d53a41c6a3bd3ff2dae8e087453.tar.gz |
feature: add layer_block client flag to bypass any layer/stacking checks and "just do it" for cool effects
this flag allows a client's layer to be changed instantly with no protocol-level checks or work, allowing compositor effects to do their work more easily
-rw-r--r-- | src/bin/e_client.c | 4 | ||||
-rw-r--r-- | src/bin/e_client.h | 1 | ||||
-rw-r--r-- | src/bin/e_comp_object.c | 30 |
3 files changed, 33 insertions, 2 deletions
diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 103e3a88c4..d5bc844720 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1337,7 +1337,8 @@ _e_client_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_ _e_client_zone_update(ec); - _e_client_hook_call(E_CLIENT_HOOK_RESIZE_UPDATE, ec); + if (e_client_resizing_get(ec)) + _e_client_hook_call(E_CLIENT_HOOK_RESIZE_UPDATE, ec); } static void @@ -1360,6 +1361,7 @@ _e_client_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA { E_Client *ec = data; + if (ec->layer_block) return; if (e_config->transient.raise && ec->transients) { Eina_List *list = eina_list_clone(ec->transients); diff --git a/src/bin/e_client.h b/src/bin/e_client.h index f73b6771a8..ea43b18358 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -672,6 +672,7 @@ struct E_Client Eina_Bool tooltip : 1; Eina_Bool redirected : 1; Eina_Bool shape_changed : 1; + Eina_Bool layer_block : 1; // client is doing crazy stuff and should not be relayered in protocol Eina_Bool ignored : 1; // client is comp-ignored Eina_Bool no_shape_cut : 1; // client shape should not be cut }; diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index a953babd03..83ade7e720 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -818,8 +818,16 @@ _e_comp_intercept_layer_set(void *data, Evas_Object *obj, int layer) unsigned int l = e_comp_canvas_layer_map(layer); int oldraise; + if (cw->ec->layer_block) + { + evas_object_layer_set(obj, layer); + if (layer == cw->ec->layer) //trying to put layer back + evas_object_stack_below(obj, cw->comp->layers[cw->layer].obj); + return; + } if (cw->layer == l) return; - if (e_comp_canvas_client_layer_map(layer) == 9999) return; //invalid layer for clients + if (e_comp_canvas_client_layer_map(layer) == 9999) + return; //invalid layer for clients not doing comp effects if (cw->ec->fullscreen) { cw->ec->saved.layer = layer; @@ -896,6 +904,11 @@ _e_comp_intercept_stack_above(void *data, Evas_Object *obj, Evas_Object *above) EINA_SAFETY_ON_TRUE_RETURN(obj == above); if (evas_object_below_get(obj) == above) return; + if (cw->ec->layer_block) + { + evas_object_stack_above(obj, above); + return; + } if (cw->ec->new_client) layer = cw->ec->layer; else @@ -982,6 +995,11 @@ _e_comp_intercept_stack_below(void *data, Evas_Object *obj, Evas_Object *below) EINA_SAFETY_ON_TRUE_RETURN(obj == below); if (evas_object_above_get(obj) == below) return; + if (cw->ec->layer_block) + { + evas_object_stack_below(obj, below); + return; + } if (cw->ec->new_client) layer = cw->ec->layer; else @@ -1064,6 +1082,11 @@ _e_comp_intercept_lower(void *data, Evas_Object *obj) E_Comp_Object *cw = data; Evas_Object *o; + if (cw->ec->layer_block) + { + evas_object_lower(obj); + return; + } if (!EINA_INLIST_GET(cw->ec)->prev) return; //already lowest on layer o = evas_object_below_get(obj); _e_comp_object_layers_remove(cw); @@ -1081,6 +1104,11 @@ _e_comp_intercept_raise(void *data, Evas_Object *obj) E_Comp_Object *cw = data; Evas_Object *o; + if (cw->ec->layer_block) + { + evas_object_raise(obj); + return; + } if (!EINA_INLIST_GET(cw->ec)->next) return;//already highest on layer { E_Client *ecabove = e_client_above_get(cw->ec); |