summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-02-27 15:00:55 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-02-27 15:05:35 -0800
commit30c5225bec62dff8f225d8e87fa64d0a78848ba1 (patch)
tree392b26c00120b9e50fb98ad894769e5c96025806 /src
parent5420ebaf3298a61f51a93a4ec01e5dda0f96698e (diff)
evas: properly disable Evas_Object event catching once we can't access Evas anymore.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c6
-rw-r--r--src/lib/evas/canvas/evas_object_main.c1
-rw-r--r--src/lib/evas/include/evas_private.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index 9bc736670b..e126d8d7f1 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -724,3 +724,9 @@ evas_object_callback_init(Efl_Canvas_Object *eo_obj, Evas_Object_Protected_Data
724{ 724{
725 efl_event_callback_array_add(eo_obj, event_catcher_watch(), obj); 725 efl_event_callback_array_add(eo_obj, event_catcher_watch(), obj);
726} 726}
727
728void
729evas_object_callback_shutdown(Efl_Canvas_Object *eo_obj, Evas_Object_Protected_Data *obj)
730{
731 efl_event_callback_array_del(eo_obj, event_catcher_watch(), obj);
732}
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 0c64bf08df..adae7d5e74 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -397,6 +397,7 @@ evas_object_free(Evas_Object *eo_obj, Eina_Bool clean_layer)
397 397
398 int was_smart_child = 0; 398 int was_smart_child = 0;
399 399
400 evas_object_callback_shutdown(eo_obj, obj);
400 if (efl_isa(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS)) 401 if (efl_isa(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
401 _evas_object_image_free(eo_obj); 402 _evas_object_image_free(eo_obj);
402 evas_object_map_set(eo_obj, NULL); 403 evas_object_map_set(eo_obj, NULL);
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 69e976c590..98d0c16d21 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1636,6 +1636,7 @@ void evas_object_clip_across_clippees_check(Evas_Object *obj, Evas_Object_Protec
1636void evas_object_mapped_clip_across_mark(Evas_Object *obj, Evas_Object_Protected_Data *pd); 1636void evas_object_mapped_clip_across_mark(Evas_Object *obj, Evas_Object_Protected_Data *pd);
1637void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info); 1637void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
1638void evas_object_callback_init(Efl_Canvas_Object *eo_obj, Evas_Object_Protected_Data *obj); 1638void evas_object_callback_init(Efl_Canvas_Object *eo_obj, Evas_Object_Protected_Data *obj);
1639void evas_object_callback_shutdown(Efl_Canvas_Object *eo_obj, Evas_Object_Protected_Data *obj);
1639void evas_object_event_callback_call(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Callback_Type type, void *event_info, int event_id, const Efl_Event_Description *efl_event_desc); 1640void evas_object_event_callback_call(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Callback_Type type, void *event_info, int event_id, const Efl_Event_Description *efl_event_desc);
1640Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y); 1641Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
1641int evas_mem_free(int mem_required); 1642int evas_mem_free(int mem_required);