From 0533ab5d8422395434333c73cfee48bbd79d86e1 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Thu, 9 Jun 2016 10:51:32 +0900 Subject: [PATCH] elm_win: Use ecore_job instead of ecore_timer for _elm_win_state_eval(). Change-Id: I717c07a8701d5ef4149ee79031d942888afe5349 --- src/lib/elm_win.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index d130ff5..fbf0e98 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -325,7 +325,7 @@ static Evas_Object *_precreated_win_obj = NULL; static Eina_Bool _elm_win_auto_throttled = EINA_FALSE; -static Ecore_Timer *_elm_win_state_eval_timer = NULL; +static Ecore_Job *_elm_win_state_eval_job = NULL; static void _elm_win_on_resize_obj_changed_size_hints(void *data, @@ -446,7 +446,7 @@ _elm_win_state_eval(void *data EINA_UNUSED) int _elm_win_count_withdrawn = 0; Eina_Bool throttle = EINA_FALSE; - _elm_win_state_eval_timer = NULL; + _elm_win_state_eval_job = NULL; EINA_LIST_FOREACH(_elm_win_list, l, obj) { @@ -572,8 +572,8 @@ _elm_win_flush_cache_and_exit(Eo *obj) static void _elm_win_state_eval_queue(void) { - if (_elm_win_state_eval_timer) ecore_timer_del(_elm_win_state_eval_timer); - _elm_win_state_eval_timer = ecore_timer_add(0.5, _elm_win_state_eval, NULL); + if (_elm_win_state_eval_job) ecore_job_del(_elm_win_state_eval_job); + _elm_win_state_eval_job = ecore_job_add(_elm_win_state_eval, NULL); } // example shot spec (wait 0.1 sec then save as my-window.png): @@ -1776,10 +1776,10 @@ _elm_win_evas_object_smart_show(Eo *obj, Elm_Win_Data *sd) if (do_eval) { - if (_elm_win_state_eval_timer) + if (_elm_win_state_eval_job) { - ecore_timer_del(_elm_win_state_eval_timer); - _elm_win_state_eval_timer = NULL; + ecore_job_del(_elm_win_state_eval_job); + _elm_win_state_eval_job = NULL; } _elm_win_state_eval(NULL); } @@ -2703,7 +2703,7 @@ _elm_win_shutdown(void) _elm_win_list = eina_list_remove_list(_elm_win_list, _elm_win_list); } } - ELM_SAFE_FREE(_elm_win_state_eval_timer, ecore_timer_del); + ELM_SAFE_FREE(_elm_win_state_eval_job, ecore_job_del); } void -- 2.7.4