compositor: Init fade surface color properly
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 13 Feb 2013 14:06:37 +0000 (16:06 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 14 Feb 2013 21:02:09 +0000 (16:02 -0500)
When fading in, if a repaint was triggered after a call to
weston_compositor_fade() but before the first call to fade_frame(),
the fade surface wouldn't be drawn because its alpha channel wasn't
initialized properly.

src/compositor.c

index c2e5387..bb129d6 100644 (file)
@@ -1112,7 +1112,7 @@ weston_compositor_fade(struct weston_compositor *compositor, float tint)
                        return;
 
                weston_surface_configure(surface, 0, 0, 8192, 8192);
-               weston_surface_set_color(surface, 0.0, 0.0, 0.0, 0.0);
+               weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0 - tint);
                wl_list_insert(&compositor->fade_layer.surface_list,
                               &surface->layer_link);
                weston_surface_update_transform(surface);