summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-05-28 21:38:40 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-28 21:50:12 -0700
commit665e88f8b4621190a9a00c1262dd6a63a8c8445c (patch)
tree17a9a51c03c3057bdac7770583270dffbace362c
parentbab45b85378956689b169702906b73359cee9f37 (diff)
downloadefl-665e88f8b4621190a9a00c1262dd6a63a8c8445c.tar.gz
edje: fix lifecycle of swallowed children
Summary: a swallowed child is per doc not deleted when the edje is deleted. After the call to invalidate is finished all children will loose theire parents and also be invalidated. However, in the efl_invalidate call, the event EVAS_CALLBACK_DEL is issued, so this is the right spot. As in legacy the swallows are in place when the EVAS_CALLBACK_DEL event is issued. Reviewers: cedric, raster, JackDanielZ, zmike Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6222 Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
-rw-r--r--src/lib/edje/edje_smart.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index c1f151d9ee..29d042c40d 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -48,12 +48,32 @@ _efl_canvas_layout_efl_object_constructor(Eo *obj, Edje *ed)
return obj;
}
+
EOLIAN static void
_efl_canvas_layout_efl_object_invalidate(Eo *obj, Edje *ed)
{
_edje_file_callbacks_del(ed, NULL);
efl_invalidate(efl_super(obj, MY_CLASS));
+
+ //invalidate is done, this means the legacy evas deletion event is called.
+ for (int i = 0; i < ed->table_parts_size; ++i)
+ {
+ Edje_Real_Part *rp = ed->table_parts[i];
+ switch(rp->type)
+ {
+ case EDJE_RP_TYPE_SWALLOW:
+ _edje_real_part_swallow_clear(ed, rp);
+ break;
+
+ case EDJE_RP_TYPE_CONTAINER:
+ if (rp->part->type == EDJE_PART_TYPE_BOX)
+ _edje_real_part_box_remove_all(ed, rp, 0);
+ else if (rp->part->type == EDJE_PART_TYPE_TABLE)
+ _edje_real_part_table_clear(ed, rp, 0);
+ break;
+ }
+ }
}
EOLIAN static void