From d9be57aa54704b4b368dc4e227070a70c0e19ab0 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Tue, 6 Aug 2013 20:03:16 +0900 Subject: [PATCH] [spinner] Whenever spinner is unfocused, timers related with value change should be deleted. --- src/lib/elm_spinner.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c index 3d0afd8..71d3527 100644 --- a/src/lib/elm_spinner.c +++ b/src/lib/elm_spinner.c @@ -490,11 +490,24 @@ _elm_spinner_smart_event(Evas_Object *obj, static Eina_Bool _elm_spinner_smart_on_focus(Evas_Object *obj) { + ELM_SPINNER_DATA_GET(obj, sd); if (!ELM_WIDGET_CLASS(_elm_spinner_parent_sc)->on_focus(obj)) return EINA_FALSE; if (!elm_widget_focus_get(obj)) - _entry_value_apply(obj); + { + if (sd->delay) + { + ecore_timer_del(sd->delay); + sd->delay = NULL; + } + if (sd->spin) + { + ecore_timer_del(sd->spin); + sd->spin = NULL; + } + _entry_value_apply(obj); + } return EINA_TRUE; } -- 2.7.4