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

* clutter/clutter-actor.c (clutter_actor_unparent): Reset the
	:show-on-set-parent property to TRUE when unparenting.

	* tests/Makefile.am: Add test-invariant to the build.

	* tests/test-invariants.c: Test the invariants that we are going
	to honour (and document, at some point).
This commit is contained in:
Emmanuele Bassi
2008-06-16 13:40:39 +00:00
parent aef6fc5f61
commit 6ec5cc538c
4 changed files with 210 additions and 1 deletions

View File

@ -5657,6 +5657,13 @@ clutter_actor_unparent (ClutterActor *self)
clutter_actor_unrealize (self);
}
/* clutter_actor_hide() will set the :show-on-set-parent property
* to FALSE because the actor doesn't have a parent anymore; but
* we need to return the actor to its initial state, so we force
* the :show-on-set-parent to be TRUE here
*/
self->priv->show_on_set_parent = TRUE;
g_signal_emit (self, actor_signals[PARENT_SET], 0, old_parent);
/* remove the reference we acquired in clutter_actor_set_parent() */