From 468c8fef69b6ec49356c8d42e46d666c7306cd54 Mon Sep 17 00:00:00 2001 From: "Junseok, Kim" Date: Wed, 19 Aug 2020 22:26:37 +0900 Subject: [PATCH] e_policy_wl: support aux_hint for transient_for always on top Change-Id: I341f5b7937e945d2192e8e1bf5ea24ef305a798e Signed-off-by: Junseok, Kim --- src/bin/e_client.h | 2 ++ src/bin/e_policy_wl.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/bin/e_client.h b/src/bin/e_client.h index d19e089dc8..4aef0c40f3 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -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) \ diff --git a/src/bin/e_policy_wl.c b/src/bin/e_policy_wl.c index 783c509ec3..1c63301dd0 100644 --- a/src/bin/e_policy_wl.c +++ b/src/bin/e_policy_wl.c @@ -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; + } + } } } -- 2.34.1