evas_clip: fix bug _clipper_del_cb function unset current clipper
authorJiyoun Park <jy0703.park@samsung.com>
Fri, 7 Apr 2017 02:35:55 +0000 (11:35 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Fri, 7 Apr 2017 02:35:55 +0000 (11:35 +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.

src/lib/evas/canvas/evas_clip.c

index 6d9f267577d260c051f1c474495e77c37b092add..3b11044845bb047681180c2d7324fb16912c61f2 100644 (file)
@@ -471,7 +471,8 @@ _clipper_del_cb(void *data, const Efl_Event *event)
 
    EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
 
-   _clip_unset(eo_obj, obj);
+   if (EINA_LIKELY(obj->cur->clipper && (obj->cur->clipper == clip)))
+     _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!