From: Mike McCormack Date: Fri, 8 Jul 2011 08:07:40 +0000 (+0000) Subject: ecore: Check for pending before entering g_main_loop X-Git-Tag: submit/efl/20131015.063327~8945 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22719d510759a58080af27ca496931c2c77e3883;p=platform%2Fupstream%2Fefl.git ecore: Check for pending before entering g_main_loop Signed-off-by: Mike McCormack SVN revision: 61150 --- diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c index 54fb39d2b5..2dc59d8790 100644 --- a/legacy/ecore/src/lib/ecore/ecore_main.c +++ b/legacy/ecore/src/lib/ecore/ecore_main.c @@ -497,12 +497,14 @@ _ecore_main_gsource_prepare(GSource *source __UNUSED__, gint *next_time) _ecore_throttle(); } + while (_ecore_signal_count_get()) _ecore_signal_call(); + /* don't check fds if somebody quit */ running = g_main_loop_is_running(ecore_main_loop); if (running) { /* only set idling state in dispatch */ - if (ecore_idling && !_ecore_idler_exist()) + if (ecore_idling && !_ecore_idler_exist() && !_ecore_event_exist()) { if (_ecore_timers_exists()) { @@ -561,7 +563,7 @@ _ecore_main_gsource_check(GSource *source __UNUSED__) in_main_loop++; /* check if old timers expired */ - if (ecore_idling && !_ecore_idler_exist()) + if (ecore_idling && !_ecore_idler_exist() && !_ecore_event_exist()) { if (timer_fd >= 0) { @@ -590,10 +592,6 @@ _ecore_main_gsource_check(GSource *source __UNUSED__) ecore_fds_ready = (_ecore_main_fdh_glib_mark_active() > 0); _ecore_main_fd_handlers_cleanup(); - /* ^C perhaps? */ - if (!ret && _ecore_signal_count_get() > 0) - ret = TRUE; - /* check timers after updating loop time */ _ecore_time_loop_time = ecore_time_get(); if (!ret && _ecore_timers_exists())