edje: selectively inhibit content,changed events when changing swallowed parts

ref T8321

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10508
This commit is contained in:
Mike Blumenkrantz 2019-10-10 13:49:45 -04:00 committed by Marcel Hollerbach
parent 9878a0cad4
commit 2477dfaf59
3 changed files with 11 additions and 1 deletions

View File

@ -1803,6 +1803,7 @@ struct _Edje
Eina_Bool canvas_animator : 1;
Eina_Bool has_state_clip : 1;
Eina_Bool has_recalc_event_cb : 1;
Eina_Bool has_content_change_event_cb : 1;
};
struct _Edje_Calc_Params_Map

View File

@ -608,6 +608,10 @@ _efl_canvas_layout_efl_object_event_callback_priority_add(Eo *obj, Edje *pd, con
{
pd->has_recalc_event_cb = EINA_TRUE;
}
else if (desc == EFL_CONTENT_EVENT_CONTENT_CHANGED)
{
pd->has_content_change_event_cb = EINA_TRUE;
}
return efl_event_callback_priority_add(efl_super(obj, MY_CLASS), desc, priority, func, user_data);
}
@ -621,6 +625,10 @@ _efl_canvas_layout_efl_object_event_callback_array_priority_add(Eo *obj, Edje *p
{
pd->has_recalc_event_cb = EINA_TRUE;
}
else if (array[i].desc == EFL_CONTENT_EVENT_CONTENT_CHANGED)
{
pd->has_content_change_event_cb = EINA_TRUE;
}
}
return efl_event_callback_array_priority_add(efl_super(obj, MY_CLASS), array, priority, user_data);
}

View File

@ -3088,7 +3088,8 @@ _edje_efl_content_content_set(Edje *ed, const char *part, Efl_Gfx_Entity *obj_sw
eud->u.swallow.child = obj_swallow;
}
}
efl_event_callback_call(ed->obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, obj_swallow);
if (ed->has_content_change_event_cb)
efl_event_callback_call(ed->obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, obj_swallow);
return EINA_TRUE;
}