Use a transient object for the dnd session

This commit is contained in:
Kristian Høgsberg 2010-09-02 20:22:42 -04:00
parent 5c63df7f1e
commit e9d37bdc5f
10 changed files with 448 additions and 428 deletions

View file

@ -146,6 +146,18 @@ wl_proxy_create(struct wl_proxy *factory,
wl_display_allocate_id(factory->display));
}
WL_EXPORT void
wl_proxy_destroy(struct wl_proxy *proxy)
{
struct wl_listener *listener, *next;
wl_list_for_each_safe(listener, next, &proxy->listener_list, link)
free(listener);
wl_hash_table_remove(proxy->display->objects, proxy->base.id);
free(proxy);
}
WL_EXPORT int
wl_proxy_add_listener(struct wl_proxy *proxy,
void (**implementation)(void), void *data)