e_policy_wl: support aux_hint for transient_for always on top 93/241893/3
authorJunseok, Kim <juns.kim@samsung.com>
Wed, 19 Aug 2020 13:26:37 +0000 (22:26 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 25 Aug 2020 12:39:25 +0000 (12:39 +0000)
Change-Id: I341f5b7937e945d2192e8e1bf5ea24ef305a798e
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
src/bin/e_client.h
src/bin/e_policy_wl.c

index d19e089dc826a7206efcf35ed0505410e12ac791..4aef0c40f3e64c3e7718492ad25d84e01004c930 100644 (file)
@@ -1010,6 +1010,8 @@ struct E_Client
       E_Layer       layer_backup; // original layer (used by no desk_group mode)
       E_Util_Transform *transform;
    } desk_group;
+
+   Eina_Bool transient_for_always_on_top;
 };
 
 #define e_client_focus_policy_click(ec) \
index 783c509ec3313241c924451dd446b2034a9276ae..1c63301dd05b7d6f6ef5cda3e0d148ae5dba599f 100644 (file)
@@ -255,6 +255,7 @@ enum _E_Policy_Hint_Type
    E_POLICY_HINT_DEPENDENT_ROTATION = 9,
    E_POLICY_HINT_ROT_RENDER_NOPENDING = 10,
    E_POLICY_HINT_ICONIFY_BUFFER_FLUSH = 11,
+   E_POLICY_HINT_TRANSIENT_FOR_ALWAYS_ON_TOP = 12,
 };
 
 static const char *hint_names[] =
@@ -271,6 +272,7 @@ static const char *hint_names[] =
    "wm.policy.win.rot.dependent",
    "wm.policy.win.rot.render.nopending",
    "wm.policy.win.iconify.buffer.flush",
+   "wm.policy.win.transient_for.always_on_top",
 };
 
 static void                _e_policy_wl_surf_del(E_Policy_Wl_Surface *psurf);
@@ -2559,6 +2561,19 @@ _e_policy_wl_aux_hint_apply(E_Client *ec)
              else
                ec->exp_iconify.buffer_flush = EINA_FALSE;
           }
+        else if (!strncmp(hint->hint, hint_names[E_POLICY_HINT_TRANSIENT_FOR_ALWAYS_ON_TOP], strlen(hint->hint)))
+          {
+             if (!strncmp(hint->val, "1", 1))
+               {
+                  ELOGF("TF_SET", "Transient for Always_on_top enabled", ec);
+                  ec->transient_for_always_on_top = EINA_TRUE;
+               }
+             else
+               {
+                  ELOGF("TF_SET", "Transient for Always_on_top disabled", ec);
+                  ec->transient_for_always_on_top = EINA_FALSE;
+               }
+          }
      }
 }