Ephoto: Reset timer when mouse leaves the overlay.

This commit is contained in:
Stephen okra Houston 2016-05-27 12:49:53 -05:00
parent b9fb381f84
commit 40941cb382
1 changed files with 7 additions and 0 deletions

View File

@ -305,6 +305,10 @@ _mouse_out_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
{ {
Ephoto *ephoto = data; Ephoto *ephoto = data;
ephoto->blocking = EINA_FALSE; ephoto->blocking = EINA_FALSE;
if (ephoto->overlay_timer)
ecore_timer_del(ephoto->overlay_timer);
ephoto->overlay_timer = ecore_timer_add(3.0, _timer_cb, ephoto);
} }
static void static void
@ -313,6 +317,9 @@ _mouse_in_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
{ {
Ephoto *ephoto = data; Ephoto *ephoto = data;
ephoto->blocking = EINA_TRUE; ephoto->blocking = EINA_TRUE;
ecore_timer_del(ephoto->overlay_timer);
ephoto->overlay_timer = NULL;
} }
static void static void