summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsleuth <sleuth>2003-03-08 23:55:57 +0000
committersleuth <sleuth@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2003-03-08 23:55:57 +0000
commit78dbd1acf987c35340235a12e86199c6878bd0cf (patch)
tree587b1d8052b6c2ee73de1d6e2f7b01e6e2de4b2f
parent813f640d0679dd8c44b2f0ed13bb2c04705e7dc7 (diff)
Plug cursor leak in new XCursor support, only impacts those additions.
Plug a pre-existing key_grab leak. e17 was leaving passive grabs in the server and not releasing them. Looks like a bug in the new config parts. Kevin Brosius <cobra@compuserve.com> SVN revision: 6755
-rw-r--r--src/config.c9
-rw-r--r--src/cursors.c33
-rw-r--r--src/data.c7
3 files changed, 32 insertions, 17 deletions
diff --git a/src/config.c b/src/config.c
index 16a0e63d2..17cc9c167 100644
--- a/src/config.c
+++ b/src/config.c
@@ -311,6 +311,15 @@ e_config_behavior_changed(E_Observer * observer, E_Observee * observee,
311 311
312 if (config_data) 312 if (config_data)
313 { 313 {
314 for (l = config_data->actions; l; l = l->next)
315 {
316 E_Action *a;
317
318 a = l->data;
319 e_object_unref((E_Object *)a);
320 l->data = NULL;
321 }
322
314 e_data_free(cfg_config, (char *)config_data); 323 e_data_free(cfg_config, (char *)config_data);
315 FREE(config_data); 324 FREE(config_data);
316 } 325 }
diff --git a/src/cursors.c b/src/cursors.c
index 690652f75..963db122c 100644
--- a/src/cursors.c
+++ b/src/cursors.c
@@ -296,10 +296,23 @@ e_cursors_display_in_window(Window win, char *type)
296 296
297 if (c) 297 if (c)
298 { 298 {
299 c->cursor = 299 /* If behavior.db has /desktops/cursors/native == 1, then use */
300 ecore_cursor_new(pmap, mask, hx, hy, fr, fg, fb, br, bg, bb); 300 /* images installed */
301 ecore_pixmap_free(pmap); 301 /* by E, else use X cursors by cursorfont id. */
302 ecore_pixmap_free(mask); 302 /* Use E's pixmap? */
303 if(config_data->desktops->e_native_cursors)
304 {
305 c->cursor =
306 ecore_cursor_new(pmap, mask, hx, hy, fr, fg, fb, br, bg, bb);
307 ecore_pixmap_free(pmap);
308 ecore_pixmap_free(mask);
309 }
310 else
311 {
312 /* No, use X cursors */
313 c->cursor =
314 XCreateFontCursor(ecore_display_get(), c->x_cursor_id);
315 }
303 cursors = evas_list_append(cursors, c); 316 cursors = evas_list_append(cursors, c);
304 } 317 }
305#if 0 318#if 0
@@ -308,17 +321,7 @@ e_cursors_display_in_window(Window win, char *type)
308 } 321 }
309 if (c) 322 if (c)
310 { 323 {
311 /* If behavior.db has /desktops/cursors/native == 1, then use */ 324 ecore_cursor_set(win, c->cursor);
312 /* images installed */
313 /* by E, else use X cursors by cursorfont id. */
314 if(config_data->desktops->e_native_cursors)
315 ecore_cursor_set(win, c->cursor);
316 else
317 {
318 Cursor x_cursor;
319 x_cursor = XCreateFontCursor(ecore_display_get(), c->x_cursor_id);
320 ecore_cursor_set(win, x_cursor);
321 }
322 } 325 }
323 else 326 else
324 { 327 {
diff --git a/src/data.c b/src/data.c
index a3a9eb927..4e9fc7604 100644
--- a/src/data.c
+++ b/src/data.c
@@ -189,8 +189,11 @@ e_data_free(E_Data_Base_Type * type, char *data)
189 189
190 data2 = l2->data; 190 data2 = l2->data;
191 l2 = evas_list_remove(l2, data2); 191 l2 = evas_list_remove(l2, data2);
192 e_data_free(node->sub_type, (char *)data2); 192 if(data2)
193 FREE(data2); 193 {
194 e_data_free(node->sub_type, (char *)data2);
195 FREE(data2);
196 }
194 } 197 }
195 } 198 }
196 break; 199 break;