(sel_lost->type == type))
{
eina_promise_resolve(sel_lost->promise, eina_value_uint_init(sel_lost->type));
- seat_sel2->sel_lost_list = eina_list_remove(seat_sel2->sel_lost_list, sel_lost);
- free(sel_lost);
}
}
seat_sel2->xwin = 0;
(sel_lost->type == type))
{
eina_promise_resolve(sel_lost->promise, eina_value_uint_init(sel_lost->type));
- seat_sel->sel_lost_list = eina_list_remove(seat_sel->sel_lost_list, sel_lost);
- free(sel_lost);
}
}
}
}
static void
-_sel_manager_promise_cancel(void *data, Efl_Loop_Consumer *consumer EINA_UNUSED,
- const Eina_Promise *dead_future EINA_UNUSED)
+_sel_manager_promise_cancel(Eo *obj EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
{
Sel_Manager_Selection_Lost *sel_lost = data;
- sel_lost->seat_sel->sel_lost_list = eina_list_remove(
- sel_lost->seat_sel->sel_lost_list, sel_lost);
+ sel_lost->seat_sel->sel_lost_list = eina_list_remove(sel_lost->seat_sel->sel_lost_list, sel_lost);
free(sel_lost);
}
sel_lost->seat_sel = seat_sel;
seat_sel->sel_lost_list = eina_list_append(seat_sel->sel_lost_list, sel_lost);
- p = efl_loop_promise_new(obj, NULL, _sel_manager_promise_cancel, NULL);
- eina_promise_data_set(p, sel_lost);
+ p = efl_loop_promise_new(obj, NULL, NULL, NULL);
if (!p) return NULL;
sel_lost->promise = p;
- return eina_future_new(p);
+ return efl_future_then(obj, eina_future_new(p),
+ .data = sel_lost,
+ .free = _sel_manager_promise_cancel);
}
/* TODO: this should not be an actual tempfile, but rather encode the object
{
sel_debug("resolve the promise: %p", sel_lost->promise);
eina_promise_resolve(sel_lost->promise, eina_value_uint_init(sel_lost->type));
- seat_sel->sel_lost_list = eina_list_remove(seat_sel->sel_lost_list, sel_lost);
- free(sel_lost);
}
}
sel->active = EINA_FALSE;
(sel_lost->type == type))
{
eina_promise_resolve(sel_lost->promise, eina_value_uint_init(sel_lost->type));
- seat_sel->sel_lost_list = eina_list_remove(seat_sel->sel_lost_list, sel_lost);
- free(sel_lost);
}
}
}
(sel_lost->type == type))
{
eina_promise_resolve(sel_lost->promise, eina_value_uint_init(sel_lost->type));
- seat_sel->sel_lost_list = eina_list_remove(seat_sel->sel_lost_list, sel_lost);
- free(sel_lost);
}
}
if (sel->owner)
(sel_lost->type == type))
{
eina_promise_resolve(sel_lost->promise, eina_value_uint_init(sel_lost->type));
- seat_sel->sel_lost_list = eina_list_remove(seat_sel->sel_lost_list, sel_lost);
- free(sel_lost);
}
}
(sel_lost->type == type))
{
eina_promise_resolve(sel_lost->promise, eina_value_uint_init(sel_lost->type));
- seat_sel->sel_lost_list = eina_list_remove(seat_sel->sel_lost_list, sel_lost);
- free(sel_lost);
}
}
seat_sel->sel_list[type].owner = NULL;