swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 0e99fc7dd111eb8c6b931212c42370dfa0853ddc
parent 41d5b9ded1a0888b1f1f90316e5e75e483493c4f
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 21 Jun 2013 01:37:18 -0700

surface: Remove callbacks if they are destroyed

Diffstat:
Msurface.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/surface.c b/surface.c @@ -1,6 +1,7 @@ #include "surface.h" #include "event.h" #include "region.h" +#include "util.h" #include <stdlib.h> #include <stdio.h> @@ -123,6 +124,7 @@ static void frame(struct wl_client * client, struct wl_resource * resource, callback_resource = wl_client_add_object(client, &wl_callback_interface, NULL, id, NULL); + wl_resource_set_destructor(callback_resource, &swc_remove_resource); wl_list_insert(surface->pending.state.frame_callbacks.prev, wl_resource_get_link(callback_resource)); }