2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>

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.
This commit is contained in:
Emmanuele Bassi 2008-06-13 14:16:22 +00:00
parent 15d9581dce
commit e3de3f196b
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,15 @@
2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
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 <ebassi@openedhand.com>
* clutter/clutter-actor.c:

View File

@ -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);