[clone] Allow cloning unparented actors
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 2 Feb 2009 11:59:39 +0000 (11:59 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 2 Feb 2009 12:07:29 +0000 (12:07 +0000)
commit6e12722a9b7135abdd43f3777476780c74080163
treeb39d98fc9599ec3cc34f5a3e574c7df650ffc8f2
parentb053d513214e764a44b82b312c948199f6a1f03f
[clone] Allow cloning unparented actors

If the source of a ClutterClone does not have a parent actor the
clone will be unable to paint it because it's missing an allocation.

A simple way to fix it is to make the ClutterClone act like a
"foster parent": when it is allocated it will check if the source
actor has a parent and if not it will allocate the source with
its preferred size.
clutter/clutter-clone.c