actor: Provide a better default pick() behaviour
authorEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 17 Jan 2012 16:13:55 +0000 (16:13 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 17 Jan 2012 16:21:54 +0000 (16:21 +0000)
commit629ded568e30a845337e41f04b04b5fcc20a82d4
tree8426825bf5461ef75e3603d659e92c611df10f64
parent0f39f20db6c906c3f32c9376a1cca94ce4c1a14f
actor: Provide a better default pick() behaviour

The default pick() behaviour does not take into consideration the
children of a ClutterActor because the existing containter actors
usually override pick(), chain up, and then paint their children.

With ClutterActor now a concrete class, though, we need a way to pick
its children without requiring a sub-class; we could simply iterate over
the children inside the default pick() implementation, but this would
lead to double painting, which is not acceptable.

A moderately gross hack is to check if the Actor instance did override
the pick() implementation, and if it is not the case, paint the children
in pick mode.
clutter/clutter-actor.c