struct
{
+ struct wl_signal destroy;
struct wl_signal parent_destroy;
} events;
};
EINTERN void
e_surface_destroy_listener_add(E_Surface *surface, struct wl_listener *listener)
{
- wl_signal_add(&surface->base.destroy_signal, listener);
+ wl_signal_add(&surface->events.destroy, listener);
}
EINTERN struct wl_listener *
e_surface_destroy_listener_get(E_Surface *surface, wl_notify_func_t notify)
{
- return wl_signal_get(&surface->base.destroy_signal, notify);
+ return wl_signal_get(&surface->events.destroy, notify);
}
EINTERN void
e_object_ref(E_OBJECT(ec));
surface->ec = ec;
+ wl_signal_init(&surface->events.destroy);
wl_signal_init(&surface->events.parent_destroy);
wl_signal_init(&surface->base.destroy_signal);
wl_signal_init(&surface->base.apply_viewport_signal);
surface = wl_container_of(listener, surface, destroy);
- if (surface->surface_viewport)
- {
- ds_surface_viewport_release(surface->surface_viewport);
- surface->surface_viewport = NULL;
- }
+ wl_signal_emit(&surface->events.destroy, surface);
wl_list_remove(&surface->destroy.link);
wl_list_remove(&surface->commit.link);