[clutter] box: Restore the ::destroy handler
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] box: Restore the ::destroy handler
- Date: Fri, 27 Jan 2012 11:56:44 +0000 (UTC)
commit fa856e3f5ed71a3dbf022525aafbd27ad63410fe
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Fri Jan 27 11:48:14 2012 +0000
box: Restore the ::destroy handler
During the gutting of ClutterBox, the destroy and dispose implementation
were removed. The former, especially, destroyed all children - which
usually meant that the redraw queues for the childre was cleared as
well. The removal introduced crashes when a Box was destroyed while its
children were still queueing redraws.
clutter/deprecated/clutter-box.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/clutter/deprecated/clutter-box.c b/clutter/deprecated/clutter-box.c
index 019dff1..33ffacd 100644
--- a/clutter/deprecated/clutter-box.c
+++ b/clutter/deprecated/clutter-box.c
@@ -232,6 +232,22 @@ clutter_box_get_property (GObject *gobject,
}
static void
+clutter_box_real_destroy (ClutterActor *actor)
+{
+ ClutterActor *iter;
+
+ iter = clutter_actor_get_first_child (actor);
+ while (iter != NULL)
+ {
+ ClutterActor *next = clutter_actor_get_next_sibling (iter);
+
+ clutter_actor_destroy (iter);
+
+ iter = next;
+ }
+}
+
+static void
clutter_box_class_init (ClutterBoxClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -239,6 +255,7 @@ clutter_box_class_init (ClutterBoxClass *klass)
g_type_class_add_private (klass, sizeof (ClutterBoxPrivate));
+ actor_class->destroy = clutter_box_real_destroy;
actor_class->get_paint_volume = clutter_box_real_get_paint_volume;
actor_class->pick = clutter_box_real_pick;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]