actor: Call show() on set parent conditionally
authorEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 26 Apr 2012 13:06:00 +0000 (14:06 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 26 Apr 2012 13:06:00 +0000 (14:06 +0100)
commit14572f4db0f6516cceb16d7015e569a4cba77b5d
tree4ab94992f09ededaa8f8d72312479d55204ced4c
parenta2f54c59f5de9d9a577e1de44c2002c160ecc13b
actor: Call show() on set parent conditionally

This commit adds a further conditional check for calling
clutter_actor_show() when adding a child to an actor. We cannot
unconditionally change the value of the show-on-set-parent property like
the original solution of commit 81b19a78f5e02ae8ffd9235054d80b172496415b
as that breaks the document invariant that show-on-set-parent will be
changed iff an actor is without a parent.

The new ADD_CHILD_SHOW_ON_SET_PARENT flag is part of the default and
legacy flags, thus retaining the default behaviour when adding a child;
the flag is not passed when reordering the list of children, which means
we ignore the state of the show-on-set-parent property.

The conformance test suite fully passes, including the newly added test
to verify that changing the paint order does not trigger visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=674510
clutter/clutter-actor.c