From 2d398a1ffa1db08d438af7b6806ca11e2fb59739 Mon Sep 17 00:00:00 2001 From: Juyeon Lee Date: Mon, 4 Mar 2019 21:22:23 +0900 Subject: [PATCH] title: send E_EVENT_CLIENT_PROPERTY when title changed if zxdg_toplevel_v6 requests title_set than, while evaluating sends e event so E modules can handle specific window exceptions refer title Change-Id: Ic459e7a1040e1178730fe40b9cb6c9b1d47e2567 Signed-off-by: Juyeon Lee --- src/bin/e_client.c | 6 ++++++ src/bin/e_client.h | 1 + src/bin/e_comp_wl_shell.c | 10 ++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index d7fdfc3ca0..5faf6df933 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -2621,6 +2621,12 @@ _e_client_eval(E_Client *ec) prop |= E_CLIENT_PROPERTY_GRAVITY; } + if (ec->changes.title) + { + ec->changes.title = 0; + prop |= E_CLIENT_PROPERTY_TITLE; + } + if ((ec->changes.visible) && (ec->visible) && (ec->new_client) && (!ec->iconic)) { int x, y; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 7598639ba5..b616a54b75 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -700,6 +700,7 @@ struct E_Client #endif Eina_Bool accepts_focus : 1; Eina_Bool tz_position : 1; /* true when new position is set using tizen_position interface */ + unsigned char title : 1; } changes; struct diff --git a/src/bin/e_comp_wl_shell.c b/src/bin/e_comp_wl_shell.c index 5bbc777ab1..2bdf744bc0 100644 --- a/src/bin/e_comp_wl_shell.c +++ b/src/bin/e_comp_wl_shell.c @@ -213,15 +213,21 @@ e_shell_e_client_name_title_set(E_Client *ec, const char *name, const char *titl EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE); if (name) - eina_stringshare_replace(&ec->icccm.name, name); + { + if (eina_stringshare_replace(&ec->icccm.name, name)) + ec->changes.title = EINA_TRUE; + } if (title) { - eina_stringshare_replace(&ec->icccm.title, title); + if (eina_stringshare_replace(&ec->icccm.title, title)) + ec->changes.title = EINA_TRUE; + if (ec->frame) e_comp_object_frame_title_set(ec->frame, title); } + if (ec->changes.title) EC_CHANGED(ec); return EINA_TRUE; } -- 2.34.1