wayland: Remove destroy listener

Do to a bad mixup, the surface listener was never actually fired.
This was accidentally fixed as part of a refactoring in a27fb19,
but the surface listener was broken, and we started crashing. To
fix, just remove the surface listener, as we've mostly been testing
without it.
This commit is contained in:
Jasper St. Pierre 2014-02-28 13:18:37 -05:00
parent 0313b38dd6
commit ddc171220a
2 changed files with 0 additions and 13 deletions

View File

@ -646,18 +646,9 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
static void static void
destroy_surface_extension (MetaWaylandSurfaceExtension *extension) destroy_surface_extension (MetaWaylandSurfaceExtension *extension)
{ {
wl_list_remove (&extension->surface_destroy_listener.link);
extension->resource = NULL; extension->resource = NULL;
} }
static void
extension_handle_surface_destroy (struct wl_listener *listener,
void *data)
{
MetaWaylandSurfaceExtension *extension = wl_container_of (listener, extension, surface_destroy_listener);
wl_resource_destroy (extension->resource);
}
static int static int
get_resource_version (struct wl_resource *master_resource, get_resource_version (struct wl_resource *master_resource,
int max_version) int max_version)
@ -684,9 +675,6 @@ create_surface_extension (MetaWaylandSurfaceExtension *extension,
extension->resource = wl_resource_create (client, interface, get_resource_version (master_resource, max_version), id); extension->resource = wl_resource_create (client, interface, get_resource_version (master_resource, max_version), id);
wl_resource_set_implementation (extension->resource, implementation, surface, destructor); wl_resource_set_implementation (extension->resource, implementation, surface, destructor);
extension->surface_destroy_listener.notify = extension_handle_surface_destroy;
wl_resource_add_destroy_listener (surface->resource, &extension->surface_destroy_listener);
return TRUE; return TRUE;
} }

View File

@ -75,7 +75,6 @@ typedef struct
typedef struct typedef struct
{ {
struct wl_resource *resource; struct wl_resource *resource;
struct wl_listener surface_destroy_listener;
} MetaWaylandSurfaceExtension; } MetaWaylandSurfaceExtension;
struct _MetaWaylandSurface struct _MetaWaylandSurface