The wayland client requests destroy of callback after recieved a callback
done event from enlightenment, and enlightenment removes the callback
resource from its managed list as response of the destroy request.
So if there are multiple frame callbacks, the loop for sending frame done
event of those multiple frame callbacks is stopped by removal of target
node(target callback resource) by the destroy request of first callback
resource.
For resolve these problem, we have to use EINA_LIST_FOREACH_SAFE instead of
EINA_LIST_FREE to keep up works with the callback list.
@fix
Change-Id: I2722ecb80855eea680f2abb80aed3d64413a0a69
ec->comp_data->pending.frames =
eina_list_remove(ec->comp_data->pending.frames, resource);
+
+ wl_resource_destroy(resource);
}
static void
{
E_Comp_Wl_Client_Data *cd;
struct wl_resource *cb;
+ Eina_List *l, *ll;
if ((!cp->client) || (!cp->client->comp_data)) return;
cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
- EINA_LIST_FREE(cd->frames, cb)
- {
- wl_callback_send_done(cb, ecore_time_unix_get());
- wl_resource_destroy(cb);
- }
+ EINA_LIST_FOREACH_SAFE(cd->frames, l, ll, cb)
+ wl_callback_send_done(cb, ecore_time_unix_get());
}
#endif
break;