summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_smart.c
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 /src/lib/edje/edje_smart.c
parentbab45b85378956689b169702906b73359cee9f37 (diff)
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>
Diffstat (limited to 'src/lib/edje/edje_smart.c')
-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 c1f151d..29d042c 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)
48 return obj; 48 return obj;
49} 49}
50 50
51
51EOLIAN static void 52EOLIAN static void
52_efl_canvas_layout_efl_object_invalidate(Eo *obj, Edje *ed) 53_efl_canvas_layout_efl_object_invalidate(Eo *obj, Edje *ed)
53{ 54{
54 _edje_file_callbacks_del(ed, NULL); 55 _edje_file_callbacks_del(ed, NULL);
55 56
56 efl_invalidate(efl_super(obj, MY_CLASS)); 57 efl_invalidate(efl_super(obj, MY_CLASS));
58
59 //invalidate is done, this means the legacy evas deletion event is called.
60 for (int i = 0; i < ed->table_parts_size; ++i)
61 {
62 Edje_Real_Part *rp = ed->table_parts[i];
63 switch(rp->type)
64 {
65 case EDJE_RP_TYPE_SWALLOW:
66 _edje_real_part_swallow_clear(ed, rp);
67 break;
68
69 case EDJE_RP_TYPE_CONTAINER:
70 if (rp->part->type == EDJE_PART_TYPE_BOX)
71 _edje_real_part_box_remove_all(ed, rp, 0);
72 else if (rp->part->type == EDJE_PART_TYPE_TABLE)
73 _edje_real_part_table_clear(ed, rp, 0);
74 break;
75 }
76 }
57} 77}
58 78
59EOLIAN static void 79EOLIAN static void