[mutter/wayland] surface-actor-wayland: Make sure to clean up on dispose
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] surface-actor-wayland: Make sure to clean up on dispose
- Date: Tue, 25 Mar 2014 16:01:03 +0000 (UTC)
commit 272676b8967780c8ef922a6c74058e3907e808ca
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Mar 25 11:59:52 2014 -0400
surface-actor-wayland: Make sure to clean up on dispose
We need to remove our destroy handler if the surface is destroyed
before the buffer is, which is the case when we have no destroy
effect.
src/compositor/meta-surface-actor-wayland.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c
index 00b7666..bf9441b 100644
--- a/src/compositor/meta-surface-actor-wayland.c
+++ b/src/compositor/meta-surface-actor-wayland.c
@@ -137,9 +137,20 @@ meta_surface_actor_wayland_get_window (MetaSurfaceActor *actor)
}
static void
+meta_surface_actor_wayland_dispose (GObject *object)
+{
+ MetaSurfaceActorWayland *self = META_SURFACE_ACTOR_WAYLAND (object);
+
+ meta_surface_actor_wayland_set_buffer (self, NULL);
+
+ G_OBJECT_CLASS (meta_surface_actor_wayland_parent_class)->dispose (object);
+}
+
+static void
meta_surface_actor_wayland_class_init (MetaSurfaceActorWaylandClass *klass)
{
MetaSurfaceActorClass *surface_actor_class = META_SURFACE_ACTOR_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
surface_actor_class->process_damage = meta_surface_actor_wayland_process_damage;
surface_actor_class->pre_paint = meta_surface_actor_wayland_pre_paint;
@@ -151,6 +162,8 @@ meta_surface_actor_wayland_class_init (MetaSurfaceActorWaylandClass *klass)
surface_actor_class->is_unredirected = meta_surface_actor_wayland_is_unredirected;
surface_actor_class->get_window = meta_surface_actor_wayland_get_window;
+
+ object_class->dispose = meta_surface_actor_wayland_dispose;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]