aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_object_inform.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-02-16 19:34:08 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-16 19:51:06 +0900
commit54e5841b2f6386765dd5e2831aa3481b952e5fd4 (patch)
treebe79add797e01e2313999f3911b36570166789dd /src/lib/evas/canvas/evas_object_inform.c
parentevas: Strengthen post-event callbacks (diff)
downloadefl-54e5841b2f6386765dd5e2831aa3481b952e5fd4.tar.gz
evas: Re-fix post-event cb by supporting recursion
The previous patch (b184874fa5a0c3177c) was preventing post-event callbacks from triggering any form of input event, including side-effects due to mouse,in. In fact by tracking which exact events we want to post-process we can support proper recursion. This fixes crashes in Bryce. I'm not changing the documentation as this is still a dubious code design. Fixes https://phab.enlightenment.org/T3144 Fixes https://phab.enlightenment.org/T5157
Diffstat (limited to 'src/lib/evas/canvas/evas_object_inform.c')
-rw-r--r--src/lib/evas/canvas/evas_object_inform.c54
1 files changed, 35 insertions, 19 deletions
diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c
index 648688fdd5..c0e8d30b58 100644
--- a/src/lib/evas/canvas/evas_object_inform.c
+++ b/src/lib/evas/canvas/evas_object_inform.c
@@ -8,78 +8,94 @@ void
evas_object_inform_call_show(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ int event_id = _evas_object_event_new();
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_SHOW, NULL, _evas_object_event_new(), EFL_GFX_EVENT_SHOW);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_SHOW, NULL, event_id, EFL_GFX_EVENT_SHOW);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_hide(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ int event_id = _evas_object_event_new();
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HIDE, NULL, _evas_object_event_new(), EFL_GFX_EVENT_HIDE);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HIDE, NULL, event_id, EFL_GFX_EVENT_HIDE);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_move(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOVE, NULL, _evas_object_event_new(), EFL_GFX_EVENT_MOVE);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ int event_id = _evas_object_event_new();
+
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOVE, NULL, event_id, EFL_GFX_EVENT_MOVE);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_resize(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESIZE, NULL, _evas_object_event_new(), EFL_GFX_EVENT_RESIZE);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ int event_id = _evas_object_event_new();
+
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESIZE, NULL, event_id, EFL_GFX_EVENT_RESIZE);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_restack(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESTACK, NULL, _evas_object_event_new(), EFL_GFX_EVENT_RESTACK);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ int event_id = _evas_object_event_new();
+
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESTACK, NULL, event_id, EFL_GFX_EVENT_RESTACK);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_object_event_new(), EFL_GFX_EVENT_CHANGE_SIZE_HINTS);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ int event_id = _evas_object_event_new();
+
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, event_id, EFL_GFX_EVENT_CHANGE_SIZE_HINTS);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_image_preloaded(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- EINA_SAFETY_ON_NULL_RETURN(obj);
+ int event_id;
+ EINA_SAFETY_ON_NULL_RETURN(obj);
if (!_evas_object_image_preloading_get(eo_obj)) return;
_evas_image_load_post_update(eo_obj, obj);
_evas_object_image_preloading_check(eo_obj);
_evas_object_image_preloading_set(eo_obj, 0);
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_object_event_new(), EFL_IMAGE_EVENT_PRELOAD);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ event_id = _evas_object_event_new();
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, event_id, EFL_IMAGE_EVENT_PRELOAD);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_image_unloaded(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_object_event_new(), EFL_IMAGE_EVENT_UNLOAD);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ int event_id = _evas_object_event_new();
+
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, event_id, EFL_IMAGE_EVENT_UNLOAD);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}
void
evas_object_inform_call_image_resize(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, _evas_object_event_new(), EFL_IMAGE_EVENT_RESIZE);
- _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
+ int event_id = _evas_object_event_new();
+
+ evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, event_id, EFL_IMAGE_EVENT_RESIZE);
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
}