forked from enlightenment/efl
ecore: Check for pending before entering g_main_loop
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 61150
This commit is contained in:
parent
c69221de26
commit
22719d5107
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue