From 6103d8db013c248b14c4b772952cc82b5f718f6b Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Wed, 15 Jul 2009 00:11:04 +0000 Subject: [PATCH] oops, fix case of timers never being fired while we have idlers. To reach this case, have a timer that would not be fired on _ecore_main_loop_iterate_internal(), for example it's not ready yet (just_added==1), system would get into this inner loop and would never stop, since there is timer expired now (next_time == 0.0), if we go to start_loop it would just get into the same loop, not dispatching and timers. Python test 04-idler.py triggered that problem. SVN revision: 41342 --- legacy/ecore/src/lib/ecore/ecore_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c index e620077a93..33fcb8ab0f 100644 --- a/legacy/ecore/src/lib/ecore/ecore_main.c +++ b/legacy/ecore/src/lib/ecore/ecore_main.c @@ -663,7 +663,7 @@ _ecore_main_loop_iterate_internal(int once_only) if (_ecore_signal_count_get() > 0) have_signal = 1; if (have_event || have_signal) break; next_time = _ecore_timer_next_get(); - if (next_time < 0) goto start_loop; + if (next_time <= 0) break; if (do_quit) break; } _ecore_loop_time = ecore_time_get();