struct wl_listener surface_resource_destroy;
struct {
+ struct wl_signal destroy;
struct wl_signal buffer_clear;
struct wl_signal buffer_clear_done;
} events;
cp->cdata->pending.buffer_viewport.changed = 0;
cp->own_cdata = EINA_TRUE;
+ wl_signal_init(&cp->events.destroy);
wl_signal_init(&cp->events.buffer_clear);
wl_signal_init(&cp->events.buffer_clear_done);
if (cp->usable)
e_pixmap_usable_set(cp, 0);
+ wl_signal_emit(&cp->events.destroy, cp);
_e_pixmap_hook_call(E_PIXMAP_HOOK_DEL, cp);
e_pixmap_image_clear(cp, EINA_FALSE);
eina_hash_del_by_key(res_ids, &cp->res_id);
}
EINTERN void
+e_pixmap_destroy_listener_add(E_Pixmap *pixmap, struct wl_listener *listener)
+{
+ wl_signal_add(&pixmap->events.destroy, listener);
+}
+
+EINTERN void
e_pixmap_buffer_clear_listener_add(E_Pixmap *pixmap, struct wl_listener *listener)
{
EINA_SAFETY_ON_NULL_RETURN(pixmap);
EINTERN E_Comp_Wl_Buffer_Type e_pixmap_buffer_type_get(E_Pixmap *pixmap);
EINTERN void e_pixmap_buffer_clear_done_send(E_Pixmap *pixmap);
+EINTERN void e_pixmap_destroy_listener_add(E_Pixmap *pixmap, struct wl_listener *listener);
EINTERN void e_pixmap_buffer_clear_listener_add(E_Pixmap *pixmap, struct wl_listener *listener);
EINTERN void e_pixmap_buffer_clear_done_listener_add(E_Pixmap *pixmap, struct wl_listener *listener);
_e_policy_client_del(E_Policy_Client *pc)
{
wl_list_remove(&pc->pixmap_buffer_clear.link);
+ wl_list_remove(&pc->pixmap_destroy.link);
if (pc->buffer_flush_timer)
ecore_timer_del(pc->buffer_flush_timer);
_e_policy_client_pixmap_buffer_clear(policy_client, only_free);
}
+static void
+_e_policy_client_cb_pixmap_destroy(struct wl_listener *listener, void *data)
+{
+ E_Policy_Client *pc;
+
+ pc = wl_container_of(listener, pc, pixmap_destroy);
+
+ wl_list_remove(&pc->pixmap_buffer_clear.link);
+ wl_list_init(&pc->pixmap_buffer_clear.link);
+
+ wl_list_remove(&pc->pixmap_destroy.link);
+ wl_list_init(&pc->pixmap_destroy.link);
+}
+
EINTERN E_Policy_Client *
e_policy_client_add(E_Client *ec)
{
_e_policy_desk_client_add_hook_add(pc);
// pixmap listener add
+ pc->pixmap_destroy.notify = _e_policy_client_cb_pixmap_destroy;
+ e_pixmap_destroy_listener_add(ec->pixmap, &pc->pixmap_destroy);
+
pc->pixmap_buffer_clear.notify = _e_policy_client_cb_pixmap_buffer_clear;
e_pixmap_buffer_clear_listener_add(ec->pixmap, &pc->pixmap_buffer_clear);
Ecore_Timer *buffer_flush_timer;
Eina_Bool buffer_flush_only_free;
+ struct wl_listener pixmap_destroy;
struct wl_listener pixmap_buffer_clear;
};