aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/evas/src/lib/canvas/evas_callbacks.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-03-22 05:33:46 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-03-22 05:33:46 +0000
commitf2b11145212af98398755ddb6e250a1c07d201a4 (patch)
tree713a0a73f5a938d326fc8ce7dd060dce5ac7c828 /legacy/evas/src/lib/canvas/evas_callbacks.c
parentactuallyu free gl context//terminate on last gl window gone. (diff)
downloadefl-f2b11145212af98398755ddb6e250a1c07d201a4.tar.gz
actually... do canvas free.
SVN revision: 47362
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_callbacks.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_callbacks.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_callbacks.c b/legacy/evas/src/lib/canvas/evas_callbacks.c
index c67c67b51b..ab27ed4cb2 100644
--- a/legacy/evas/src/lib/canvas/evas_callbacks.c
+++ b/legacy/evas/src/lib/canvas/evas_callbacks.c
@@ -2,6 +2,7 @@
#include "evas_private.h"
static void evas_object_event_callback_clear(Evas_Object *obj);
+static void evas_event_callback_clear(Evas *e);
int _evas_event_counter = 0;
void
@@ -38,6 +39,20 @@ evas_object_event_callback_clear(Evas_Object *obj)
}
}
+static void
+evas_event_callback_clear(Evas *e)
+{
+ if (!e->callbacks) return;
+ if (!e->callbacks->deletions_waiting) return;
+ e->callbacks->deletions_waiting = 0;
+ evas_event_callback_list_post_free(&e->callbacks->callbacks);
+ if (!e->callbacks->callbacks)
+ {
+ free(e->callbacks);
+ e->callbacks = NULL;
+ }
+}
+
void
evas_object_event_callback_all_del(Evas_Object *obj)
{
@@ -83,7 +98,10 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
}
e->callbacks->walking_list--;
if (!e->callbacks->walking_list)
- l_mod = NULL;
+ {
+ evas_event_callback_clear(e);
+ l_mod = NULL;
+ }
}
_evas_unwalk(e);
}
@@ -644,6 +662,8 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
data = fn->data;
fn->delete_me = 1;
e->callbacks->deletions_waiting = 1;
+ if (!e->callbacks->walking_list)
+ evas_event_callback_clear(e);
return data;
}
}
@@ -699,6 +719,8 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun
data = fn->data;
fn->delete_me = 1;
e->callbacks->deletions_waiting = 1;
+ if (!e->callbacks->walking_list)
+ evas_event_callback_clear(e);
return data;
}
}