jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=820b8a0e6f65642c2cfd4196f8d08fe444bce310
commit 820b8a0e6f65642c2cfd4196f8d08fe444bce310 Author: Jean-Philippe Andre <jp.an...@samsung.com> Date: Wed Sep 6 15:57:35 2017 +0900 evas: Fix evas grid It's a complete mess mixing legacy and EO in a really bad way. --- src/lib/evas/canvas/evas_object_grid.c | 16 ++++++---------- src/lib/evas/canvas/evas_object_smart.c | 2 -- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c index e8b9598cc7..8aab7cffd4 100644 --- a/src/lib/evas/canvas/evas_object_grid.c +++ b/src/lib/evas/canvas/evas_object_grid.c @@ -159,19 +159,17 @@ EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid, static void _evas_object_grid_smart_add(Evas_Object *o) { + Evas_Object_Smart_Clipped_Data *base; Evas_Grid_Data *priv; - priv = evas_object_smart_data_get(o); - if (!priv) - { - priv = efl_data_ref(o, MY_CLASS); - evas_object_smart_data_set(o, priv); - } + // Grid is an ugly mix of legacy & eo... + base = evas_object_smart_data_get(o); + priv = efl_data_scope_get(o, MY_CLASS); + priv->base = *base; + evas_object_smart_data_set(o, priv); priv->size.w = 100; priv->size.h = 100; - - _evas_object_grid_parent_sc->add(o); } static void @@ -189,7 +187,6 @@ _evas_object_grid_smart_del(Evas_Object *o) free(opt); l = eina_list_remove_list(l, l); } - _evas_object_grid_parent_sc->del(o); } static void @@ -290,7 +287,6 @@ _evas_grid_efl_object_constructor(Eo *obj, Evas_Grid_Data *class_data EINA_UNUSE evas_object_smart_attach(obj, _evas_object_grid_smart_class_new()); return obj; -// return evas_object_smart_add(evas, _evas_object_grid_smart_class_new()); } EOLIAN static Evas_Object* diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 5ca58ddcb4..19a9eeba93 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1832,8 +1832,6 @@ _efl_canvas_group_group_clipped_set(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *sd, // We must call this function BEFORE the constructor (yes, it's hacky) EINA_SAFETY_ON_FALSE_RETURN(!sd->object); sd->clipped = !!clipped; - if (clipped && !sd->data) - sd->data = calloc(1, sizeof(Evas_Object_Smart_Clipped_Data)); } /* Internal EO APIs */ --