From 373a89a421a99ec0a61a8eea723c03ee395f4091 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 21 Dec 2017 14:16:58 +0000 Subject: [PATCH] core: Sit the freeze/thaw example on mainloop for now --- reference/c/core/src/core_event.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/reference/c/core/src/core_event.c b/reference/c/core/src/core_event.c index 35c0c762..f62f25c4 100644 --- a/reference/c/core/src/core_event.c +++ b/reference/c/core/src/core_event.c @@ -60,22 +60,16 @@ _freezethaw_cb(void *data, const Efl_Event *event) static void _events_freeze(Efl_Loop *mainloop) { - Efl_Loop *polled; - printf("Test 2:\n"); - // we add a secondary loop to experiment with freeze/thaw of events. - // if we did these experiments on the main loop, we could not receive - // the timer events used to control the test. - polled = efl_add(EFL_LOOP_CLASS, mainloop, - efl_name_set(efl_added, "subloop")); - efl_event_callback_add(polled, EFL_LOOP_EVENT_POLL_HIGH, _poll_cb, NULL); + // Set up a new poll on the main loop that we will interupt with freeze. + efl_event_callback_add(mainloop, EFL_LOOP_EVENT_POLL_HIGH, _poll_cb, NULL); // notify every 0.1 seconds efl_add(EFL_LOOP_TIMER_CLASS, mainloop, efl_name_set(efl_added, "timer2"), efl_loop_timer_interval_set(efl_added, .1), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _freezethaw_cb, polled)); + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _freezethaw_cb, mainloop)); } static void