Yo Tom, I think there is an issue with the reparenting. The combobox test crashes on it.
If you take a scenario to add an entry to a combobox, it seems working in this way: entry = eo_add(combobox) -> 1 ref eo_parent_set(entry, edje_combobox) via _edje_real_part_swallow __entry: 1 ref + 1 TempRef eo_composite_detach(combobox, entry): eo_parent_set(entry, NULL): __entry: 1 ref + 2 TempRef __body: 0 ref + 2 TempRef __exit: 0 ref + 1 TempRef __body: sets the parent but doesn't ref __exit: 0 ref + 0 TempRef -> destruction You should double-check to be sure I didn't miss something. JackDanielZ On Mon, 18 Apr 2016 02:15:53 -0700 Tom Hacohen <t...@stosb.com> wrote: > tasn pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=4d0494574b2cda85ff0c6b968be362594c36aa37 > > commit 4d0494574b2cda85ff0c6b968be362594c36aa37 > Author: Tom Hacohen <t...@stosb.com> > Date: Thu Apr 7 14:56:57 2016 +0100 > > Edje: Reparent when swallowing/unswallowing. > > On swallow make the edje object the parent, on unswallow the > canvas. --- > src/lib/edje/edje_edit.c | 7 ++++++- > src/lib/edje/edje_util.c | 13 +++++++++++++ > 2 files changed, 19 insertions(+), 1 deletion(-) > > diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c > index 05ed301..5ddd4f4 100644 > --- a/src/lib/edje/edje_edit.c > +++ b/src/lib/edje/edje_edit.c > @@ -315,6 +315,7 @@ _edje_real_part_free(Edje *ed, Edje_Real_Part *rp) > if ((rp->type == EDJE_RP_TYPE_SWALLOW) && (rp->typedata.swallow) > && (rp->typedata.swallow->swallowed_object)) > { > + eo_parent_set(rp->typedata.swallow->swallowed_object, > evas_common_evas_get(ed->obj)); > evas_object_smart_member_del(rp->typedata.swallow->swallowed_object); > evas_object_event_callback_del(rp->typedata.swallow->swallowed_object, > EVAS_CALLBACK_FREE, _edje_object_part_swallow_free_cb); @@ -3147,7 > +3148,11 @@ _edje_edit_real_part_add(Evas_Object *obj, const char > *name, Edje_Part_Type type evas_object_show(rp->object); > evas_object_smart_member_add(rp->object, ed->obj); > evas_object_layer_set(rp->object, evas_object_layer_get(ed->obj)); > - if (ep->type != EDJE_PART_TYPE_SWALLOW && ep->type != > EDJE_PART_TYPE_GROUP) > + if (ep->type == EDJE_PART_TYPE_SWALLOW) > + { > + eo_parent_set(rp->object, ed->obj); > + } > + else if (ep->type != EDJE_PART_TYPE_GROUP) > { > if (ep->mouse_events) > { > diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c > index 4a522d8..a34d81c 100644 > --- a/src/lib/edje/edje_util.c > +++ b/src/lib/edje/edje_util.c > @@ -4966,6 +4966,7 @@ _edje_child_add(Edje *ed, Edje_Real_Part *rp, > Evas_Object *child) evas_object_event_callback_add(child, > EVAS_CALLBACK_DEL, _edje_child_del_cb, rp); > evas_object_data_set(child, ".edje", ed); if (!ed) return; > + eo_parent_set(child, ed->obj); > ed->dirty = EINA_TRUE; > ed->recalc_call = EINA_TRUE; > #ifdef EDJE_CALC_CACHE > @@ -4975,11 +4976,21 @@ _edje_child_add(Edje *ed, Edje_Real_Part *rp, > Evas_Object *child) } > > static void > +_eo_unparent_helper(Eo *child, Eo *parent) > +{ > + if (eo_parent_get(child) == parent) > + { > + eo_parent_set(child, evas_common_evas_get(parent)); > + } > +} > + > +static void > _edje_child_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child) > { > evas_object_event_callback_del_full(child, EVAS_CALLBACK_DEL, > _edje_child_del_cb, rp); evas_object_data_del(child, ".edje"); > if (!ed) return; > + _eo_unparent_helper(child, ed->obj); > ed->dirty = EINA_TRUE; > ed->recalc_call = EINA_TRUE; > #ifdef EDJE_CALC_CACHE > @@ -6322,6 +6333,7 @@ _edje_real_part_swallow(Edje *ed, > #endif > if (!obj_swallow) return; > rp->typedata.swallow->swallowed_object = obj_swallow; > + eo_parent_set(obj_swallow, ed->obj); > evas_object_smart_member_add(rp->typedata.swallow->swallowed_object, > ed->obj); if (rp->part->clip_to_id >= 0) > { > @@ -6380,6 +6392,7 @@ _edje_real_part_swallow_clear(Edje *ed, > Edje_Real_Part *rp) if ((rp->type != EDJE_RP_TYPE_SWALLOW) || > (!rp->typedata.swallow)) return; > if (!rp->typedata.swallow->swallowed_object) return; > + _eo_unparent_helper(rp->typedata.swallow->swallowed_object, > ed->obj); > evas_object_smart_member_del(rp->typedata.swallow->swallowed_object); > evas_object_event_callback_del_full(rp->typedata.swallow->swallowed_object, > EVAS_CALLBACK_DEL, > ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel