summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-01-22 14:37:56 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-01-22 14:39:10 -0500
commit6a934f703c8f800dcd17f0be947075040c549089 (patch)
treea0ec0f1784d3c39c403795c57572868fcc4fcba2 /src/modules
parent02594a25199c377fd9eb73d071d33500e88443e3 (diff)
ee engines should not crash when re-setting the same title/name_class
@fix
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c1
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c19
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c20
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c2
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c1
5 files changed, 29 insertions, 14 deletions
diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
index 2c0d724505..f66b7be16e 100644
--- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
+++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
@@ -325,6 +325,7 @@ _ecore_evas_title_set(Ecore_Evas *ee, const char *title)
325{ 325{
326 INF("ecore evas title set"); 326 INF("ecore evas title set");
327 327
328 if (eina_streq(ee->prop.title, title)) return;
328 if (ee->prop.title) free(ee->prop.title); 329 if (ee->prop.title) free(ee->prop.title);
329 ee->prop.title = NULL; 330 ee->prop.title = NULL;
330 if (title) ee->prop.title = strdup(title); 331 if (title) ee->prop.title = strdup(title);
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 7e458e1456..40ec670550 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -692,6 +692,7 @@ _ecore_evas_drm_hide(Ecore_Evas *ee)
692static void 692static void
693_ecore_evas_drm_title_set(Ecore_Evas *ee, const char *title) 693_ecore_evas_drm_title_set(Ecore_Evas *ee, const char *title)
694{ 694{
695 if (eina_streq(ee->prop.title, title)) return;
695 if (ee->prop.title) free(ee->prop.title); 696 if (ee->prop.title) free(ee->prop.title);
696 ee->prop.title = NULL; 697 ee->prop.title = NULL;
697 if (title) ee->prop.title = strdup(title); 698 if (title) ee->prop.title = strdup(title);
@@ -700,12 +701,18 @@ _ecore_evas_drm_title_set(Ecore_Evas *ee, const char *title)
700static void 701static void
701_ecore_evas_drm_name_class_set(Ecore_Evas *ee, const char *n, const char *c) 702_ecore_evas_drm_name_class_set(Ecore_Evas *ee, const char *n, const char *c)
702{ 703{
703 if (ee->prop.name) free(ee->prop.name); 704 if (!eina_streq(ee->prop.name, n))
704 if (ee->prop.clas) free(ee->prop.clas); 705 {
705 ee->prop.name = NULL; 706 if (ee->prop.name) free(ee->prop.name);
706 ee->prop.clas = NULL; 707 ee->prop.name = NULL;
707 if (n) ee->prop.name = strdup(n); 708 if (n) ee->prop.name = strdup(n);
708 if (c) ee->prop.clas = strdup(c); 709 }
710 if (!eina_streq(ee->prop.clas, c))
711 {
712 if (ee->prop.clas) free(ee->prop.clas);
713 ee->prop.clas = NULL;
714 if (c) ee->prop.clas = strdup(c);
715 }
709} 716}
710 717
711static void 718static void
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 76036c3b62..424a5aa87a 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -1098,6 +1098,7 @@ _ecore_evas_wl_common_title_set(Ecore_Evas *ee, const char *title)
1098 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1098 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1099 1099
1100 if (!ee) return; 1100 if (!ee) return;
1101 if (eina_streq(ee->prop.title, title)) return;
1101 if (ee->prop.title) free(ee->prop.title); 1102 if (ee->prop.title) free(ee->prop.title);
1102 ee->prop.title = NULL; 1103 ee->prop.title = NULL;
1103 if (title) ee->prop.title = strdup(title); 1104 if (title) ee->prop.title = strdup(title);
@@ -1123,13 +1124,18 @@ _ecore_evas_wl_common_name_class_set(Ecore_Evas *ee, const char *n, const char *
1123 1124
1124 if (!ee) return; 1125 if (!ee) return;
1125 wdata = ee->engine.data; 1126 wdata = ee->engine.data;
1126 if (ee->prop.name) free(ee->prop.name); 1127 if (!eina_streq(ee->prop.name, n))
1127 if (ee->prop.clas) free(ee->prop.clas); 1128 {
1128 ee->prop.name = NULL; 1129 if (ee->prop.name) free(ee->prop.name);
1129 ee->prop.clas = NULL; 1130 ee->prop.name = NULL;
1130 if (n) ee->prop.name = strdup(n); 1131 if (n) ee->prop.name = strdup(n);
1131 if (c) ee->prop.clas = strdup(c); 1132 }
1132 1133 if (!eina_streq(ee->prop.clas, c))
1134 {
1135 if (ee->prop.clas) free(ee->prop.clas);
1136 ee->prop.clas = NULL;
1137 if (c) ee->prop.clas = strdup(c);
1138 }
1133 if (ee->prop.clas) 1139 if (ee->prop.clas)
1134 ecore_wl_window_class_name_set(wdata->win, ee->prop.clas); 1140 ecore_wl_window_class_name_set(wdata->win, ee->prop.clas);
1135} 1141}
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index 88397c7efe..933345584a 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -757,7 +757,7 @@ static void
757_ecore_evas_win32_title_set(Ecore_Evas *ee, const char *title) 757_ecore_evas_win32_title_set(Ecore_Evas *ee, const char *title)
758{ 758{
759 INF("ecore evas title set"); 759 INF("ecore evas title set");
760 760 if (eina_streq(ee->prop.title, title)) return;
761 if (ee->prop.title) free(ee->prop.title); 761 if (ee->prop.title) free(ee->prop.title);
762 ee->prop.title = NULL; 762 ee->prop.title = NULL;
763 if (title) ee->prop.title = strdup(title); 763 if (title) ee->prop.title = strdup(title);
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 a128e7cf1b..a401d465eb 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -2898,6 +2898,7 @@ _ecore_evas_x_activate(Ecore_Evas *ee)
2898static void 2898static void
2899_ecore_evas_x_title_set(Ecore_Evas *ee, const char *t) 2899_ecore_evas_x_title_set(Ecore_Evas *ee, const char *t)
2900{ 2900{
2901 if (eina_streq(ee->prop.title, t)) return;
2901 if (ee->prop.title) free(ee->prop.title); 2902 if (ee->prop.title) free(ee->prop.title);
2902 ee->prop.title = NULL; 2903 ee->prop.title = NULL;
2903 if (!t) return; 2904 if (!t) return;