discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9666f288ae606f181f676ad1768864d830d29ee3
commit 9666f288ae606f181f676ad1768864d830d29ee3 Author: Shinwoo Kim <cinoo....@samsung.com> Date: Thu Aug 2 09:10:41 2018 -0400 Efl.Canvas.Group: use desired function Summary: If a smart class overrides Evas_Smart_Class.move as below, then original behavior must not be used for the smart class. Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass"); evas_object_smart_clipped_smart_set(&sc); sc.move = &myMove; But current implementation makes original behavior work. So before using the original method, this patch is checking if the original method is changed or not. Reviewers: zmike, devilhorns Reviewed By: zmike Subscribers: woohyun, jypark, cedric, raster, jpeg, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6468 --- src/lib/evas/canvas/evas_object_smart.c | 9 ++++++++- src/lib/evas/canvas/evas_object_smart_clipped.c | 2 +- src/lib/evas/include/evas_private.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 37c8868479..6223792cae 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -888,10 +888,17 @@ _efl_canvas_group_efl_gfx_entity_visible_set(Eo *eo_obj, Evas_Smart_Data *o, Ein EOLIAN static void _efl_canvas_group_efl_gfx_entity_position_set(Eo *eo_obj, Evas_Smart_Data *o, Eina_Position2D pos) { + Eina_Bool is_overridden; + Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); + if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y)) return; - if (o->clipped) + is_overridden = (obj->is_smart && obj->smart.smart && + obj->smart.smart->smart_class->move != + (void *)evas_object_smart_clipped_smart_move); + + if (o->clipped && !is_overridden) _evas_object_smart_clipped_smart_move_internal(eo_obj, pos.x, pos.y); efl_gfx_entity_position_set(efl_super(eo_obj, MY_CLASS), pos); } diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c index 60cdc78e7d..a904479c01 100644 --- a/src/lib/evas/canvas/evas_object_smart_clipped.c +++ b/src/lib/evas/canvas/evas_object_smart_clipped.c @@ -33,7 +33,7 @@ evas_object_smart_clipped_smart_del(Evas_Object *eo_obj) cso->clipper = NULL; } -static void +void evas_object_smart_clipped_smart_move(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y) { if (!efl_isa(eo_obj, EFL_CANVAS_GROUP_CLASS)) return; diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index a63194df3f..b149c0b19e 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1633,6 +1633,7 @@ const Eina_List *evas_object_event_grabber_members_list(const Eo *eo_obj); const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj); void _efl_canvas_group_group_members_all_del(Evas_Object *eo_obj); void _evas_object_smart_clipped_init(Evas_Object *eo_obj); +void evas_object_smart_clipped_smart_move(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y); void _evas_object_smart_clipped_smart_move_internal(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y); void evas_call_smarts_calculate(Evas *e); void evas_object_smart_bounding_box_update(Evas_Object_Protected_Data *obj); --