From ded0ea14263278f0c4625ae93f0457f4e7e9f0be Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Wed, 5 Aug 2015 14:52:29 +0900 Subject: [PATCH] e_client: added E_Transient to support various transient_fortype - The enum E_Transient indicates transient_for type. E_TRANSIENT_ABOVE : stack a client above its parent E_TRANSIENT_BELOW : stack a client below its parent - Restack transients with transient_policy Change-Id: I433927c7504f46bc13ac2a68fa380581e170fcfd Signed-off-by: MinJeong Kim --- src/bin/e_client.c | 24 ++++++++++++++++++------ src/bin/e_client.h | 7 +++++++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index b5106d7..664fd05 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1498,7 +1498,7 @@ _e_client_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA if (e_config->transient.raise && ec->transients) { Eina_List *list = eina_list_clone(ec->transients); - E_Client *child, *below = NULL; + E_Client *child, *below = NULL, *above = NULL; E_LIST_REVERSE_FREE(list, child) { @@ -1506,11 +1506,23 @@ _e_client_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA * thats another option. */ if (child->iconic) continue; - if (below) - evas_object_stack_below(child->frame, below->frame); - else - evas_object_stack_above(child->frame, ec->frame); - below = child; + if (child->transient_policy == E_TRANSIENT_ABOVE) + { + if (below) + evas_object_stack_below(child->frame, below->frame); + else + evas_object_stack_above(child->frame, ec->frame); + below = child; + } + else if (child->transient_policy == E_TRANSIENT_BELOW) + { + if (above) + evas_object_stack_above(child->frame, above->frame); + else + evas_object_stack_below(child->frame, ec->frame); + above = child; + } + } } if (ec->unredirected_single) return; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 02a65a9..16bacdc 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -116,6 +116,12 @@ typedef enum _E_Fullscreen E_FULLSCREEN_ZOOM } E_Fullscreen; +typedef enum _E_Transient +{ + E_TRANSIENT_ABOVE, + E_TRANSIENT_BELOW, +} E_Transient; + typedef enum _E_Window_Placement { E_WINDOW_PLACEMENT_SMART, @@ -684,6 +690,7 @@ struct E_Client unsigned int user_skip_winlist : 1; E_Maximize maximized; E_Fullscreen fullscreen_policy; + E_Transient transient_policy; unsigned int borderless : 1; unsigned char offer_resistance : 1; Eina_Stringshare *bordername; -- 2.7.4