title: send E_EVENT_CLIENT_PROPERTY when title changed 16/200816/2
authorJuyeon Lee <juyeonne.lee@samsung.com>
Mon, 4 Mar 2019 12:22:23 +0000 (21:22 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 7 Mar 2019 07:22:47 +0000 (07:22 +0000)
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 <juyeonne.lee@samsung.com>
src/bin/e_client.c
src/bin/e_client.h
src/bin/e_comp_wl_shell.c

index d7fdfc3ca09528ba117f342dbf23968103acca12..5faf6df933b504afb2dafa6dda2ad6f3fa092bfd 100644 (file)
@@ -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;
index 7598639ba581853cda781acdf699a8b1ca54e306..b616a54b75c99505c330516e06161f6be46055c8 100644 (file)
@@ -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
index 5bbc777ab16379d29bcb94c7074fd1a62824ecb7..2bdf744bc0beddf8018eba8afd88c83f2c5d2925 100644 (file)
@@ -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;
 }