actor: Top-levels should always report a 255 opacity

The paint opacity should always assume a fully opaque top-level at the
end, otherwise the scene would be rendered fully transparent.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2050
This commit is contained in:
Emmanuele Bassi 2010-06-24 17:21:26 +01:00
parent 42df1a150b
commit a950388bc6

View File

@ -6824,6 +6824,13 @@ clutter_actor_get_paint_opacity_internal (ClutterActor *self)
ClutterActorPrivate *priv = self->priv;
ClutterActor *parent;
/* override the top-level opacity to always be 255; even in
* case of ClutterStage:use-alpha being TRUE we want the rest
* of the scene to be painted
*/
if (CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IS_TOPLEVEL)
return 255;
if (priv->opacity_parent != NULL)
return clutter_actor_get_paint_opacity_internal (priv->opacity_parent);