From 038f828ab152a1d96152724adbb47a04a0e235fe Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Sun, 9 Aug 2015 12:59:44 +0200 Subject: [PATCH] SurfaceActorWayland: Destroy frame callbacks when the surface gets destroyed https://bugzilla.gnome.org/show_bug.cgi?id=739163 --- src/compositor/meta-surface-actor-wayland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c index 069f6e965..d89f6dcd3 100644 --- a/src/compositor/meta-surface-actor-wayland.c +++ b/src/compositor/meta-surface-actor-wayland.c @@ -423,8 +423,14 @@ meta_surface_actor_wayland_get_surface (MetaSurfaceActorWayland *self) void meta_surface_actor_wayland_surface_destroyed (MetaSurfaceActorWayland *self) { + MetaWaylandFrameCallback *callback, *next; MetaSurfaceActorWaylandPrivate *priv = meta_surface_actor_wayland_get_instance_private (self); + wl_list_for_each_safe (callback, next, &priv->frame_callback_list, link) + { + wl_resource_destroy (callback->resource); + } + priv->surface = NULL; }