evas_clip: fix bug _clipper_del_cb function unset current clipper 72/123772/1
authorJiyoun Park <jy0703.park@samsung.com>
Fri, 7 Apr 2017 02:43:35 +0000 (11:43 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Fri, 7 Apr 2017 02:47:10 +0000 (11:47 +0900)
   old_clipper = evas_object_clip_get(objA);
   evas_object_clip_unset(obj_A);
   evas_object_clip_set(obj_A, new_clipper);
   evas_object_del(old_clipper);

   when old_clipper deleted, _clipper_del_cb unset the current new_clipper of obj_A.

   opensource_commit: 258b42b47be4cda891c2c92a8be13b6cef199063
   Author: Jiyoun Park <jy0703.park@samsung.com>
   Date:   Fri Apr 7 11:35:55 2017 +0900

Change-Id: Ibc2f494f1d1243116b1ea15804a4222463ee90df

src/lib/evas/canvas/evas_clip.c

index 2c9400d..c47f2ac 100644 (file)
@@ -452,7 +452,8 @@ _clipper_del_cb(void *data, Eo *eo_clip, const Eo_Event_Description *desc EINA_U
 
    EVAS_OBJECT_DATA_VALID_CHECK(obj, EO_CALLBACK_CONTINUE);
 
-   _evas_object_clip_unset(eo_obj, obj);
+   if (EINA_LIKELY(obj->cur->clipper && (obj->cur->clipper == clip)))
+     _evas_object_clip_unset(eo_obj, obj);
    if (obj->prev->clipper && (obj->prev->clipper == clip))
      {
         // not removing cb since it's the del cb... it can't be called again!