summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-01-15 01:30:27 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-01-15 01:30:27 -0500
commit836650e36462a81d5aec49ee227ff56e438b31bb (patch)
treef747ef85624d27142355f1c03de08b46510b8772 /src/modules
parent56d75b755f6414952ee7235f5ee8a3d60b813be7 (diff)
ecore-evas-x should check itself before it wrecks itself when re-setting the same name/class
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c18
1 files 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 1249e1668c..a128e7cf1b 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)
2909static void 2909static void
2910_ecore_evas_x_name_class_set(Ecore_Evas *ee, const char *n, const char *c) 2910_ecore_evas_x_name_class_set(Ecore_Evas *ee, const char *n, const char *c)
2911{ 2911{
2912 if (ee->prop.name) free(ee->prop.name); 2912 if (!eina_streq(n, ee->prop.name))
2913 if (ee->prop.clas) free(ee->prop.clas); 2913 {
2914 ee->prop.name = NULL; 2914 free(ee->prop.name);
2915 ee->prop.clas = NULL; 2915 ee->prop.name = NULL;
2916 if (n) ee->prop.name = strdup(n); 2916 if (n) ee->prop.name = strdup(n);
2917 if (c) ee->prop.clas = strdup(c); 2917 }
2918 if (!eina_streq(c, ee->prop.clas))
2919 {
2920 free(ee->prop.clas);
2921 ee->prop.clas = NULL;
2922 if (c) ee->prop.clas = strdup(c);
2923 }
2918 ecore_x_icccm_name_class_set(ee->prop.window, ee->prop.name, ee->prop.clas); 2924 ecore_x_icccm_name_class_set(ee->prop.window, ee->prop.name, ee->prop.clas);
2919} 2925}
2920 2926