From: Jean-Philippe Andre Date: Mon, 27 Nov 2017 13:24:01 +0000 (+0900) Subject: win: Allow unref until deletion X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~1357 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c372e5e6c77bdd28ac1fd3b922a60d263f7d94ef;p=platform%2Fupstream%2Fefl.git win: Allow unref until deletion This is for bindings. I wish I could actually distinguish the use case more (between efl_add() from C and instantiation from C++). --- diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 3a3d823..3ebbdb1 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -5406,6 +5406,10 @@ _efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *pd) pd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_STANDARD_CLASS, obj); pd->profile.available = eina_array_new(4); + // For bindings: if no parent, allow simple unref + if (!efl_parent_get(obj)) + efl_allow_parent_unref_set(obj, EINA_TRUE); + efl_composite_attach(obj, pd->manager); _efl_ui_focus_manager_redirect_events_add(pd->manager, obj);