forked from enlightenment/efl
evas: Fix infinite recursion on smart object resize
In some situations smart object resize could fall in an infinite loop even though the size was stable. Thanks @vtorri for the report!
This commit is contained in:
parent
da7281f2ae
commit
0891466d5f
|
@ -132,11 +132,8 @@ _evas_object_intercept_call(Evas_Object *eo_obj, Evas_Object_Intercept_Cb_Type c
|
|||
case EVAS_OBJECT_INTERCEPT_CB_RESIZE:
|
||||
i = va_arg(args, int);
|
||||
j = va_arg(args, int);
|
||||
if (!internal)
|
||||
{
|
||||
if (_efl_canvas_object_efl_gfx_size_set_block(eo_obj, obj, i, j))
|
||||
goto end_block;
|
||||
}
|
||||
if (_efl_canvas_object_efl_gfx_size_set_block(eo_obj, obj, i, j, internal))
|
||||
goto end_block;
|
||||
if (!obj->interceptors) goto end_noblock;
|
||||
blocked = evas_object_intercept_call_resize(eo_obj, obj, i, j);
|
||||
break;
|
||||
|
|
|
@ -1030,9 +1030,9 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
|||
|
||||
Eina_Bool
|
||||
_efl_canvas_object_efl_gfx_size_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
||||
Evas_Coord w, Evas_Coord h)
|
||||
Evas_Coord w, Evas_Coord h, Eina_Bool internal)
|
||||
{
|
||||
if (obj->doing.in_resize > 0)
|
||||
if (!internal && (obj->doing.in_resize > 0))
|
||||
{
|
||||
WRN("evas_object_resize() called on object %p (%s) when in the middle "
|
||||
"of resizing the same object", eo_obj, efl_class_name_get(eo_obj));
|
||||
|
|
|
@ -1707,7 +1707,7 @@ void _efl_canvas_object_clip_prev_reset(Evas_Object_Protected_Data *obj, Eina_Bo
|
|||
|
||||
Eina_Bool _efl_canvas_object_clip_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_clip, Evas_Object_Protected_Data *clip);
|
||||
Eina_Bool _efl_canvas_object_clip_unset_block(Eo *eo_obj, Evas_Object_Protected_Data *obj);
|
||||
Eina_Bool _efl_canvas_object_efl_gfx_size_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h);
|
||||
Eina_Bool _efl_canvas_object_efl_gfx_size_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h, Eina_Bool internal);
|
||||
|
||||
void _canvas_event_default_flags_set(Eo *e, void *_pd, va_list *list);
|
||||
void _canvas_event_default_flags_get(Eo *e, void *_pd, va_list *list);
|
||||
|
|
Loading…
Reference in New Issue