mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
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:
parent
0313b38dd6
commit
ddc171220a
@ -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;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,6 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
struct wl_resource *resource;
|
||||
struct wl_listener surface_destroy_listener;
|
||||
} MetaWaylandSurfaceExtension;
|
||||
|
||||
struct _MetaWaylandSurface
|
||||
|
Loading…
Reference in New Issue
Block a user