jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0891466d5f443ae94cdc9ab823dc499f6ad47ce6

commit 0891466d5f443ae94cdc9ab823dc499f6ad47ce6
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Thu Dec 1 16:55:20 2016 +0900

    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!
---
 src/lib/evas/canvas/evas_object_intercept.c | 7 ++-----
 src/lib/evas/canvas/evas_object_main.c      | 4 ++--
 src/lib/evas/include/evas_private.h         | 2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_intercept.c 
b/src/lib/evas/canvas/evas_object_intercept.c
index f4bbe9d..faeedee 100644
--- a/src/lib/evas/canvas/evas_object_intercept.c
+++ b/src/lib/evas/canvas/evas_object_intercept.c
@@ -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;
diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index 18df96d..317d45a 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -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));
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index f6a011b..06b8c1e 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -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);

-- 


Reply via email to