elementary: not every call are from ecore_job infrastructure, NULL only when they are.

This is something that our tests suite detected. Please pay attention.
This commit is contained in:
Cedric BAIL 2016-11-01 11:36:10 -07:00
parent 0fd1445508
commit 4a434a94aa
1 changed files with 12 additions and 5 deletions

View File

@ -197,15 +197,12 @@ _elm_cursor_obj_del(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UN
}
static void
_elm_cursor_set_hot_spots(void *data)
_elm_cursor_set_hot_spots(Elm_Cursor *cur)
{
Elm_Cursor *cur = data;
const char *str;
Evas_Coord cx, cy, cw, ch, x, y, w, h;
int prev_hot_x, prev_hot_y;
cur->hotupdate_job = NULL;
prev_hot_x = cur->hot_x;
prev_hot_y = cur->hot_y;
@ -228,12 +225,22 @@ _elm_cursor_set_hot_spots(void *data)
}
}
static void
_elm_cursor_set_hot_spots_job(void *data)
{
Elm_Cursor *cur = data;
cur->hotupdate_job = NULL;
_elm_cursor_set_hot_spots(cur);
}
static void
_elm_cursor_hot_change(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Elm_Cursor *cur = data;
if (cur->hotupdate_job) ecore_job_del(cur->hotupdate_job);
cur->hotupdate_job = ecore_job_add(_elm_cursor_set_hot_spots, data);
cur->hotupdate_job = ecore_job_add(_elm_cursor_set_hot_spots_job, data);
}
static Eina_Bool