Enlightenment CVS committal
Author : sleuth
Project : e17
Module : apps/e
Dir : e17/apps/e/src
Modified Files:
data.c cursors.c config.c
Log Message:
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 <[EMAIL PROTECTED]>
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/data.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- data.c 15 Jan 2003 18:29:55 -0000 1.2
+++ data.c 8 Mar 2003 23:55:57 -0000 1.3
@@ -189,8 +189,11 @@
data2 = l2->data;
l2 = evas_list_remove(l2, data2);
- e_data_free(node->sub_type, (char *)data2);
- FREE(data2);
+ if(data2)
+ {
+ e_data_free(node->sub_type, (char *)data2);
+ FREE(data2);
+ }
}
}
break;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/cursors.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- cursors.c 8 Mar 2003 12:51:06 -0000 1.11
+++ cursors.c 8 Mar 2003 23:55:57 -0000 1.12
@@ -296,10 +296,23 @@
if (c)
{
- c->cursor =
- ecore_cursor_new(pmap, mask, hx, hy, fr, fg, fb, br, bg, bb);
- ecore_pixmap_free(pmap);
- ecore_pixmap_free(mask);
+ /* If behavior.db has /desktops/cursors/native == 1, then use */
+ /* images installed */
+ /* by E, else use X cursors by cursorfont id. */
+ /* Use E's pixmap? */
+ if(config_data->desktops->e_native_cursors)
+ {
+ c->cursor =
+ ecore_cursor_new(pmap, mask, hx, hy, fr, fg, fb, br, bg, bb);
+ ecore_pixmap_free(pmap);
+ ecore_pixmap_free(mask);
+ }
+ else
+ {
+ /* No, use X cursors */
+ c->cursor =
+ XCreateFontCursor(ecore_display_get(), c->x_cursor_id);
+ }
cursors = evas_list_append(cursors, c);
}
#if 0
@@ -308,17 +321,7 @@
}
if (c)
{
- /* If behavior.db has /desktops/cursors/native == 1, then use */
- /* images installed */
- /* by E, else use X cursors by cursorfont id. */
- if(config_data->desktops->e_native_cursors)
- ecore_cursor_set(win, c->cursor);
- else
- {
- Cursor x_cursor;
- x_cursor = XCreateFontCursor(ecore_display_get(), c->x_cursor_id);
- ecore_cursor_set(win, x_cursor);
- }
+ ecore_cursor_set(win, c->cursor);
}
else
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/config.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- config.c 8 Mar 2003 12:51:06 -0000 1.34
+++ config.c 8 Mar 2003 23:55:57 -0000 1.35
@@ -311,6 +311,15 @@
if (config_data)
{
+ for (l = config_data->actions; l; l = l->next)
+ {
+ E_Action *a;
+
+ a = l->data;
+ e_object_unref((E_Object *)a);
+ l->data = NULL;
+ }
+
e_data_free(cfg_config, (char *)config_data);
FREE(config_data);
}
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs