edje: unswallow objects from parent edje when swallowing into new edje
authorMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 11 Jan 2016 23:27:35 +0000 (18:27 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 11 Jan 2016 23:30:47 +0000 (18:30 -0500)
the passed edje is not guaranteed to be the one which owns the swallowed
object at any given time, so get the current owner to ensure that the
correct one is passed

ref a645c8153f82c593920190416b8115b546b3668f

 #MasterOfAllBorkers

@fix

src/lib/edje/edje_util.c

index cdf1f5c..221bd1d 100644 (file)
@@ -3500,10 +3500,13 @@ _edje_object_part_swallow(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Evas_
    rpcur = evas_object_data_get(obj_swallow, "\377 edje.swallowing_part");
    if (rpcur)
      {
+        Edje *sed;
+
         /* the object is already swallowed in the requested part */
         if (rpcur == rp) return EINA_TRUE;
+        sed = evas_object_data_get(obj_swallow, ".edje");
         /* The object is already swallowed somewhere, unswallow it first */
-        edje_object_part_unswallow(ed->obj, obj_swallow);
+        edje_object_part_unswallow(sed->obj, obj_swallow);
      }
 
    if (!rp)