discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=836650e36462a81d5aec49ee227ff56e438b31bb

commit 836650e36462a81d5aec49ee227ff56e438b31bb
Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Jan 15 01:30:27 2015 -0500

    ecore-evas-x should check itself before it wrecks itself when re-setting 
the same name/class
---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c 
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 1249e16..a128e7c 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -2909,12 +2909,18 @@ _ecore_evas_x_title_set(Ecore_Evas *ee, const char *t)
 static void
 _ecore_evas_x_name_class_set(Ecore_Evas *ee, const char *n, const char *c)
 {
-   if (ee->prop.name) free(ee->prop.name);
-   if (ee->prop.clas) free(ee->prop.clas);
-   ee->prop.name = NULL;
-   ee->prop.clas = NULL;
-   if (n) ee->prop.name = strdup(n);
-   if (c) ee->prop.clas = strdup(c);
+   if (!eina_streq(n, ee->prop.name))
+     {
+        free(ee->prop.name);
+        ee->prop.name = NULL;
+        if (n) ee->prop.name = strdup(n);
+     }
+   if (!eina_streq(c, ee->prop.clas))
+     {
+        free(ee->prop.clas);
+        ee->prop.clas = NULL;
+        if (c) ee->prop.clas = strdup(c);
+     }
    ecore_x_icccm_name_class_set(ee->prop.window, ee->prop.name, ee->prop.clas);
 }
 

-- 


Reply via email to