summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore/ecore_main.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-08-22 09:32:39 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-08-22 09:32:39 +0000
commited6ed2987eea25f59f3fb79d73a7b4eead314166 (patch)
treed2294d1cb1f506567d2fe39cc0018762bf9fab9f /legacy/ecore/src/lib/ecore/ecore_main.c
parent15a3582483e0701d5c539d6b7d35b6326e8826ea (diff)
we dont need 1 if level in ecore mainloop. it really isn't needed.
been harmless though. SVN revision: 62682
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c86
1 files changed, 42 insertions, 44 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c
index c274a59072..290052ddf2 100644
--- a/legacy/ecore/src/lib/ecore/ecore_main.c
+++ b/legacy/ecore/src/lib/ecore/ecore_main.c
@@ -1678,67 +1678,65 @@ _ecore_main_loop_iterate_internal(int once_only)
1678 _ecore_timer_enable_new(); 1678 _ecore_timer_enable_new();
1679 return; 1679 return;
1680 } 1680 }
1681 if (!_ecore_event_exist()) 1681 /* init flags */
1682 have_event = have_signal = 0;
1683 next_time = _ecore_timer_next_get();
1684 /* no timers */
1685 if (next_time < 0)
1682 { 1686 {
1683 /* init flags */ 1687 /* no idlers */
1684 have_event = have_signal = 0; 1688 if (!_ecore_idler_exist())
1685 next_time = _ecore_timer_next_get();
1686 /* no timers */
1687 if (next_time < 0)
1688 { 1689 {
1689 /* no idlers */ 1690 if (_ecore_main_select(-1.0) > 0) have_event = 1;
1690 if (!_ecore_idler_exist())
1691 {
1692 if (_ecore_main_select(-1.0) > 0) have_event = 1;
1693 }
1694 /* idlers */
1695 else
1696 {
1697 for (;;)
1698 {
1699 _ecore_time_loop_time = ecore_time_get();
1700 if (!_ecore_idler_call()) goto start_loop;
1701 if (_ecore_main_select(0.0) > 0) break;
1702 if (_ecore_event_exist()) break;
1703 if (_ecore_signal_count_get() > 0) break;
1704 if (_ecore_timers_exists()) goto start_loop;
1705 if (do_quit) break;
1706 }
1707 }
1708 } 1691 }
1709 /* timers */ 1692 /* idlers */
1710 else 1693 else
1711 { 1694 {
1712 /* no idlers */ 1695 for (;;)
1713 if (!_ecore_idler_exist())
1714 { 1696 {
1715 if (_ecore_main_select(next_time) > 0) have_event = 1; 1697 _ecore_time_loop_time = ecore_time_get();
1698 if (!_ecore_idler_call()) goto start_loop;
1699 if (_ecore_main_select(0.0) > 0) break;
1700 if (_ecore_event_exist()) break;
1701 if (_ecore_signal_count_get() > 0) break;
1702 if (_ecore_timers_exists()) goto start_loop;
1703 if (do_quit) break;
1716 } 1704 }
1717 /* idlers */ 1705 }
1718 else 1706 }
1707 /* timers */
1708 else
1709 {
1710 /* no idlers */
1711 if (!_ecore_idler_exist())
1712 {
1713 if (_ecore_main_select(next_time) > 0) have_event = 1;
1714 }
1715 /* idlers */
1716 else
1717 {
1718 for (;;)
1719 { 1719 {
1720 for (;;) 1720 _ecore_time_loop_time = ecore_time_get();
1721 { 1721 if (!_ecore_idler_call()) goto start_loop;
1722 _ecore_time_loop_time = ecore_time_get(); 1722 if (_ecore_main_select(0.0) > 0) break;
1723 if (!_ecore_idler_call()) goto start_loop; 1723 if (_ecore_event_exist()) break;
1724 if (_ecore_main_select(0.0) > 0) break; 1724 if (_ecore_signal_count_get() > 0) break;
1725 if (_ecore_event_exist()) break; 1725 if (have_event || have_signal) break;
1726 if (_ecore_signal_count_get() > 0) break; 1726 next_time = _ecore_timer_next_get();
1727 if (have_event || have_signal) break; 1727 if (next_time <= 0) break;
1728 next_time = _ecore_timer_next_get(); 1728 if (do_quit) break;
1729 if (next_time <= 0) break;
1730 if (do_quit) break;
1731 }
1732 } 1729 }
1733 } 1730 }
1734 } 1731 }
1732
1735 if (_ecore_fps_debug) t1 = ecore_time_get(); 1733 if (_ecore_fps_debug) t1 = ecore_time_get();
1736 /* we came out of our "wait state" so idle has exited */ 1734 /* we came out of our "wait state" so idle has exited */
1735 process_events:
1737 if (!once_only) _ecore_idle_exiter_call(); 1736 if (!once_only) _ecore_idle_exiter_call();
1738 /* call the fd handler per fd that became alive... */ 1737 /* call the fd handler per fd that became alive... */
1739 /* this should read or write any data to the monitored fd and then */ 1738 /* this should read or write any data to the monitored fd and then */
1740 /* post events onto the ecore event pipe if necessary */ 1739 /* post events onto the ecore event pipe if necessary */
1741 process_events:
1742 _ecore_main_fd_handlers_call(); 1740 _ecore_main_fd_handlers_call();
1743 if (fd_handlers_with_buffer) 1741 if (fd_handlers_with_buffer)
1744 _ecore_main_fd_handlers_buf_call(); 1742 _ecore_main_fd_handlers_buf_call();