ecore: the main loop has no parent and only one ref, let's properly create it.

This commit is contained in:
Cedric Bail 2018-03-19 15:33:11 -07:00
parent fccaeb182e
commit c3c5620c1c
2 changed files with 2 additions and 2 deletions

View File

@ -1079,7 +1079,7 @@ _ecore_main_loop_shutdown(void)
if (!ML_OBJ) return;
_ecore_main_loop_clear(ML_OBJ, ML_DAT);
// XXX: this seemingly closes fd's it shouldn't.... :( fd 0?
efl_del(ML_OBJ);
efl_unref(ML_OBJ);
}
void

View File

@ -111,7 +111,7 @@ EOLIAN static Efl_Loop *
_efl_app_loop_main_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
{
if (_mainloop_singleton) return _mainloop_singleton;
_mainloop_singleton = efl_add(EFL_APP_CLASS, NULL);
_mainloop_singleton = efl_add_ref(EFL_APP_CLASS, NULL);
_mainloop_singleton_data = efl_data_scope_get(_mainloop_singleton, EFL_LOOP_CLASS);
return _mainloop_singleton;
}