ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/examples.git/commit/?id=373a89a421a99ec0a61a8eea723c03ee395f4091

commit 373a89a421a99ec0a61a8eea723c03ee395f4091
Author: Andy Williams <a...@andywilliams.me>
Date:   Thu Dec 21 14:16:58 2017 +0000

    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 35c0c76..f62f25c 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

-- 


Reply via email to