From b073f5d94834c701bb1fc6e0fe7482e265aeb774 Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Fri, 1 Dec 2023 15:28:11 +0900 Subject: [PATCH] e_client/e_config: add configuration for fullscreen layer We add a configuration for the fullscreen layer. For this, we can change the fullscreen layer using configuration each environment. By default, the fullscreen layer is the normal layer. Change-Id: Ic8303c112b58229253c46231b30ffd530f03cd26 --- src/bin/e_client.c | 16 +++++++++++++++- src/bin/e_client.h | 3 ++- src/bin/e_config.c | 1 + src/bin/e_config.h | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index c59b871..a9edcbd 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -3159,6 +3159,19 @@ e_client_unignore(E_Client *ec) _e_client_event_add(ec); } +static E_Layer +_e_client_convert_fullscreen_layer(int layer) +{ + if (layer <= E_LAYER_CLIENT_NORMAL) + return E_LAYER_CLIENT_NORMAL; + else if (layer <= E_LAYER_CLIENT_ABOVE) + return E_LAYER_CLIENT_ABOVE; + else if (layer <= E_LAYER_CLIENT_EDGE) + return E_LAYER_CLIENT_EDGE; + else + return E_LAYER_CLIENT_FULLSCREEN; +} + E_API E_Client * e_client_new(E_Pixmap *cp, int first_map, int internal) { @@ -3194,6 +3207,7 @@ e_client_new(E_Pixmap *cp, int first_map, int internal) ec->post_lower = EINA_FALSE; ec->animatable = EINA_TRUE; ec->maximize_type = e_config->maximize_policy & E_MAXIMIZE_TYPE; + ec->fullscreen_layer = _e_client_convert_fullscreen_layer(e_config->fullscreen_layer); /* FIXME: if first_map is 1 then we should ignore the first hide event * or ensure the window is already hidden and events flushed before we @@ -4273,7 +4287,7 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy) } ec->saved.layer = ec->layer; - e_client_layer_set(ec, E_LAYER_CLIENT_FULLSCREEN); + e_client_layer_set(ec, ec->fullscreen_layer); ec->fullscreen = 1; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index c789fa6..175af60 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -774,7 +774,8 @@ struct E_Client unsigned int want_focus : 1; unsigned int user_skip_winlist : 1; E_Maximize maximized; - E_Fullscreen fullscreen_policy; // TODO: should be removed - yigl + E_Fullscreen fullscreen_policy; + E_Layer fullscreen_layer; E_Transient transient_policy; unsigned int borderless : 1; unsigned char offer_resistance : 1; diff --git a/src/bin/e_config.c b/src/bin/e_config.c index fa48ca3..8625bcf 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -181,6 +181,7 @@ _e_config_edd_init(Eina_Bool old) E_CONFIG_VAL(D, T, transient.desktop, INT); E_CONFIG_VAL(D, T, transient.iconify, INT); E_CONFIG_VAL(D, T, fullscreen_policy, INT); + E_CONFIG_VAL(D, T, fullscreen_layer, INT); E_CONFIG_VAL(D, T, dpms_enable, INT); E_CONFIG_VAL(D, T, dpms_standby_enable, INT); E_CONFIG_VAL(D, T, dpms_suspend_enable, INT); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index 68eb052..c1ba253 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -76,6 +76,7 @@ struct _E_Config int iconify; } transient; int fullscreen_policy; + int fullscreen_layer; int dpms_enable; int dpms_standby_enable; int dpms_suspend_enable; -- 2.7.4