From ddc171220a92b6a1ac8b73f7f256a32f3113a0cb Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 28 Feb 2014 13:18:37 -0500 Subject: [PATCH] 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. --- src/wayland/meta-wayland-surface.c | 12 ------------ src/wayland/meta-wayland-surface.h | 1 - 2 files changed, 13 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index ebf0c52f9..15c94ea9a 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -646,18 +646,9 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor, static void destroy_surface_extension (MetaWaylandSurfaceExtension *extension) { - wl_list_remove (&extension->surface_destroy_listener.link); 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 get_resource_version (struct wl_resource *master_resource, 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); 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; } diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h index e0203f58c..ef9ccaa4f 100644 --- a/src/wayland/meta-wayland-surface.h +++ b/src/wayland/meta-wayland-surface.h @@ -75,7 +75,6 @@ typedef struct typedef struct { struct wl_resource *resource; - struct wl_listener surface_destroy_listener; } MetaWaylandSurfaceExtension; struct _MetaWaylandSurface