forked from enlightenment/efl
ecore: do not create another main loop object
So ecore main loop does restart everything with an main loop shutdown and init when it detect a bad fd. This can happen if you del a fd after you have destroyed it. Something terminology is doing (and should be legal), but that then ended up with a main loop with no event handler registered and the process was looking like stuck with nothing happening.
This commit is contained in:
parent
cab208e83f
commit
aa4da11b33
|
@ -257,6 +257,8 @@ ecore_init(void)
|
|||
vpath = eo_add(EFL_VPATH_CORE_CLASS, NULL);
|
||||
if (vpath) efl_vpath_manager_register(EFL_VPATH_MANAGER_CLASS, 0, vpath);
|
||||
|
||||
_mainloop_singleton = eo_add(EFL_LOOP_CLASS, NULL);
|
||||
|
||||
_ecore_signal_init();
|
||||
#ifndef HAVE_EXOTIC
|
||||
_ecore_exe_init();
|
||||
|
|
|
@ -1030,6 +1030,8 @@ quit:
|
|||
void
|
||||
_ecore_main_loop_init(void)
|
||||
{
|
||||
// Please note that this function is being also called in case of a bad fd to reset the main loop.
|
||||
|
||||
DBG("_ecore_main_loop_init");
|
||||
epoll_fd = epoll_create(1);
|
||||
if ((epoll_fd < 0) && HAVE_EPOLL)
|
||||
|
@ -1117,7 +1119,7 @@ _ecore_main_loop_init(void)
|
|||
DBG("loaded dlsyms uv");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* setup for the g_main_loop only integration */
|
||||
#ifdef USE_G_MAIN_LOOP
|
||||
ecore_glib_source = g_source_new(&ecore_gsource_funcs, sizeof (GSource));
|
||||
|
@ -1155,13 +1157,13 @@ _ecore_main_loop_init(void)
|
|||
#endif
|
||||
|
||||
detect_time_changes_start();
|
||||
|
||||
_mainloop_singleton = eo_add(EFL_LOOP_CLASS, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
_ecore_main_loop_shutdown(void)
|
||||
{
|
||||
// Please note that _ecore_main_loop_shutdown is called in cycle to restart the main loop in case of a bad fd
|
||||
|
||||
#ifdef USE_G_MAIN_LOOP
|
||||
if (ecore_glib_source)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue