elm : fix return of gengrid item swap anim to prevent animation memory leak. 64/240164/1
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 4 Aug 2020 05:18:01 +0000 (14:18 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 4 Aug 2020 05:26:26 +0000 (05:26 +0000)
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

index 991f430..6eb78a0 100755 (executable)
@@ -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