From d0524a4144625cd44dc243b69e42f382c48a6e10 Mon Sep 17 00:00:00 2001 From: SangHyeon Jade Lee Date: Tue, 4 Aug 2020 14:18:01 +0900 Subject: [PATCH] elm : fix return of gengrid item swap anim to prevent animation memory leak. Summary: this is memory leak fix on gengrid item move. when animation reached 1.0, it finish all animation and returns EINA_FALSE to delete current animation. Test Plan: N/A Reviewers: eagleeye Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12083 Change-Id: I564ca939b96ab5fbe0cbc8784f32aab533f644ec --- src/lib/elementary/elm_gengrid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 991f430..6eb78a0 100755 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -3615,6 +3615,7 @@ _item_move_cb(void *data, double pos) double frame = pos; Evas_Coord xx1, yy1, xx2, yy2; double dx, dy; + Eina_Bool ret = EINA_TRUE; switch (sd->reorder.tween_mode) { @@ -3676,10 +3677,11 @@ _item_move_cb(void *data, double pos) efl_event_callback_legacy_call (sd->obj, ELM_GENGRID_EVENT_MOVED, EO_OBJ(sd->reorder.it1)); sd->reorder.running = EINA_FALSE; + ret = EINA_FALSE; } _elm_widget_focus_highlight_start(sd->obj); - return EINA_TRUE; + return ret; } static void -- 2.7.4