compositor: Init fade surface color properly

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.
Ander Conselvan de Oliveira 12 years ago committed by Kristian Høgsberg
parent c4a42ca6b5
commit 4c65da5fc0
  1. 2
      src/compositor.c

@ -1226,7 +1226,7 @@ weston_compositor_fade(struct weston_compositor *compositor, float tint)
return; return;
weston_surface_configure(surface, 0, 0, 8192, 8192); 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, wl_list_insert(&compositor->fade_layer.surface_list,
&surface->layer_link); &surface->layer_link);
weston_surface_update_transform(surface); weston_surface_update_transform(surface);

Loading…
Cancel
Save