From: Enlightenment S. <no-...@en...> - 2011-07-12 11:57:10
|
Log: ecore: Make g_main_loop call idle enterers last Signed-off-by: Mike McCormack <mj....@sa...> Author: mike_m Date: 2011-07-12 04:57:03 -0700 (Tue, 12 Jul 2011) New Revision: 61285 Trac: http://trac.enlightenment.org/e/changeset/61285 Modified: trunk/ecore/src/bin/ecore_test.c trunk/ecore/src/lib/ecore/ecore_main.c Modified: trunk/ecore/src/bin/ecore_test.c =================================================================== --- trunk/ecore/src/bin/ecore_test.c 2011-07-12 11:56:54 UTC (rev 61284) +++ trunk/ecore/src/bin/ecore_test.c 2011-07-12 11:57:03 UTC (rev 61285) @@ -104,8 +104,8 @@ ecore_main_loop_begin(); - /* FIXME?: glib main loop exits on an idle enterer */ - //assert(called == idle_enterer_str); + /* glib main loop exits on an idle enterer */ + assert(called == idle_enterer_str); ecore_shutdown(); return 0; Modified: trunk/ecore/src/lib/ecore/ecore_main.c =================================================================== --- trunk/ecore/src/lib/ecore/ecore_main.c 2011-07-12 11:56:54 UTC (rev 61284) +++ trunk/ecore/src/lib/ecore/ecore_main.c 2011-07-12 11:57:03 UTC (rev 61285) @@ -237,6 +237,7 @@ static guint ecore_glib_source_id; static GMainLoop* ecore_main_loop; static gboolean ecore_idling; +static gboolean _ecore_glib_idle_enterer_called; static gboolean ecore_fds_ready; #endif @@ -489,11 +490,11 @@ in_main_loop++; - if (!ecore_idling) + if (!ecore_idling && !_ecore_glib_idle_enterer_called) { - /* when idling, busy loop checking the fds only */ - _ecore_idle_enterer_call(); - _ecore_throttle(); + _ecore_idle_enterer_call(); + _ecore_throttle(); + _ecore_glib_idle_enterer_called = FALSE; } while (_ecore_signal_count_get()) _ecore_signal_call(); @@ -668,6 +669,10 @@ while (_ecore_timer_call(_ecore_time_loop_time)); _ecore_timer_cleanup(); + + _ecore_idle_enterer_call(); + _ecore_throttle(); + _ecore_glib_idle_enterer_called = TRUE; } in_main_loop--; |