e_client/e_config: add configuration for fullscreen layer 51/302151/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 1 Dec 2023 06:28:11 +0000 (15:28 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 1 Dec 2023 06:58:05 +0000 (15:58 +0900)
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
src/bin/e_client.h
src/bin/e_config.c
src/bin/e_config.h

index c59b871..a9edcbd 100644 (file)
@@ -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;
 
index c789fa6..175af60 100644 (file)
@@ -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;
index fa48ca3..8625bcf 100644 (file)
@@ -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);
index 68eb052..c1ba253 100644 (file)
@@ -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;