in the case where ecore_main_loop_quit() was called before ecore_main_loop_begin(),
the latter call would exit immediately without ever iterating the main loop
@fix
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9360
void
_ecore_main_loop_begin(Eo *obj, Efl_Loop_Data *pd)
{
+ pd->loop_active++;
if (obj == ML_OBJ)
{
#ifdef HAVE_SYSTEMD
pd->do_quit = 0;
#endif
}
+ pd->loop_active--;
}
void
_ecore_main_loop_quit(Eo *obj, Efl_Loop_Data *pd)
{
+ if (!pd->loop_active) return;
pd->do_quit = 1;
if (obj != ML_OBJ) return;
#ifdef USE_G_MAIN_LOOP
int idlers;
int in_loop;
+ unsigned int loop_active;
struct {
int high;