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

* clutter/clutter-actor.c:
	(clutter_actor_set_parent): Document and maintain the invariant
	that after setting a realized parent on an actor, the actor is
	also going to be realized.

	(clutter_actor_unparent): Change the invariant that an unparented
	actor is also unrealized: the paint is fast enough to avoid
	unrealizing, since it also causes more problems that what it's
	worth.

	* tests/test-invariants.c (test_show_on_set_parent): Update the
	invariants test because we changed the invariants.
This commit is contained in:
Emmanuele Bassi
2008-06-17 09:33:18 +00:00
parent d03314cb84
commit ec91b3d253
3 changed files with 54 additions and 17 deletions

View File

@ -165,7 +165,7 @@ test_show_on_set_parent (void)
"show-on-set-parent", &show_on_set_parent,
NULL);
g_assert (!(CLUTTER_ACTOR_IS_REALIZED (actor)));
g_assert (CLUTTER_ACTOR_IS_REALIZED (actor));
g_assert (!(CLUTTER_ACTOR_IS_VISIBLE (actor)));
g_assert (show_on_set_parent == TRUE);