From e3de3f196b4523111f9661dc182a1c23fe5326be Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 13 Jun 2008 14:16:22 +0000 Subject: [PATCH] 2008-06-13 Emmanuele Bassi Bug #953 - Actors are not hidden before unrealized or disposed (Tommi Komulainen) * clutter/clutter-actor.c: (clutter_actor_unrealize): Hide a visible actor when unrealizing it. (clutter_actor_dispose): Make sure to unrealize an actor when disposing it. --- ChangeLog | 12 ++++++++++++ clutter/clutter-actor.c | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 276ef28d2..baee625b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-06-13 Emmanuele Bassi + + Bug #953 - Actors are not hidden before unrealized or + disposed (Tommi Komulainen) + + * clutter/clutter-actor.c: + (clutter_actor_unrealize): Hide a visible actor when unrealizing + it. + + (clutter_actor_dispose): Make sure to unrealize an actor when + disposing it. + 2008-06-13 Emmanuele Bassi * clutter/clutter-actor.c: diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 52e78826c..d4e5858f7 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -582,6 +582,12 @@ clutter_actor_unrealize (ClutterActor *self) if (!CLUTTER_ACTOR_IS_REALIZED (self)) return; + /* unrealizing also means hiding a visible actor, exactly + * like showing implies realization if called on an unrealized + * actor. this keeps the flags in sync. + */ + clutter_actor_hide (self); + CLUTTER_ACTOR_UNSET_FLAGS (self, CLUTTER_ACTOR_REALIZED); g_signal_emit (self, actor_signals[UNREALIZE], 0); @@ -1870,6 +1876,8 @@ clutter_actor_dispose (GObject *object) priv->parent_actor = NULL; } + clutter_actor_unrealize (self); + destroy_shader_data (self); g_signal_emit (self, actor_signals[DESTROY], 0);