summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore/ecore_main.c
diff options
context:
space:
mode:
authorMike McCormack <mj.mccormack@samsung.com>2011-07-08 08:07:40 +0000
committerMike McCormack <mikem@ring3k.org>2011-07-08 08:07:40 +0000
commit22719d510759a58080af27ca496931c2c77e3883 (patch)
treefc127ea08805d331e4b7c7ba7141f66751572d3e /legacy/ecore/src/lib/ecore/ecore_main.c
parentc69221de2679082b13f88036a250e398227a6f8a (diff)
ecore: Check for pending before entering g_main_loop
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 61150
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c10
1 files changed, 4 insertions, 6 deletions
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)
497 _ecore_throttle(); 497 _ecore_throttle();
498 } 498 }
499 499
500 while (_ecore_signal_count_get()) _ecore_signal_call();
501
500 /* don't check fds if somebody quit */ 502 /* don't check fds if somebody quit */
501 running = g_main_loop_is_running(ecore_main_loop); 503 running = g_main_loop_is_running(ecore_main_loop);
502 if (running) 504 if (running)
503 { 505 {
504 /* only set idling state in dispatch */ 506 /* only set idling state in dispatch */
505 if (ecore_idling && !_ecore_idler_exist()) 507 if (ecore_idling && !_ecore_idler_exist() && !_ecore_event_exist())
506 { 508 {
507 if (_ecore_timers_exists()) 509 if (_ecore_timers_exists())
508 { 510 {
@@ -561,7 +563,7 @@ _ecore_main_gsource_check(GSource *source __UNUSED__)
561 in_main_loop++; 563 in_main_loop++;
562 564
563 /* check if old timers expired */ 565 /* check if old timers expired */
564 if (ecore_idling && !_ecore_idler_exist()) 566 if (ecore_idling && !_ecore_idler_exist() && !_ecore_event_exist())
565 { 567 {
566 if (timer_fd >= 0) 568 if (timer_fd >= 0)
567 { 569 {
@@ -590,10 +592,6 @@ _ecore_main_gsource_check(GSource *source __UNUSED__)
590 ecore_fds_ready = (_ecore_main_fdh_glib_mark_active() > 0); 592 ecore_fds_ready = (_ecore_main_fdh_glib_mark_active() > 0);
591 _ecore_main_fd_handlers_cleanup(); 593 _ecore_main_fd_handlers_cleanup();
592 594
593 /* ^C perhaps? */
594 if (!ret && _ecore_signal_count_get() > 0)
595 ret = TRUE;
596
597 /* check timers after updating loop time */ 595 /* check timers after updating loop time */
598 _ecore_time_loop_time = ecore_time_get(); 596 _ecore_time_loop_time = ecore_time_get();
599 if (!ret && _ecore_timers_exists()) 597 if (!ret && _ecore_timers_exists())