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++).
This commit is contained in:
Jean-Philippe Andre 2017-11-27 22:24:01 +09:00
parent 5901b4601e
commit c372e5e6c7
1 changed files with 4 additions and 0 deletions

View File

@ -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);