On Sat, Sep 07, 2013 at 05:10:25PM +0200, Axel Davy wrote: > After these effects, alpha could not have been 1.0, preventing > not redrawing behind opaque windows.
Nice catch, we don't wan't to end up with slightly transparent windows. I think we can just set surface->alpha to animation->stop in weston_surface_animation_destroy() though. We already reset the transformation there, so resetting alpha doesn't seem like a big problem. Kristian > Signed-off-by: Axel Davy <[email protected]> > --- > src/shell.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/src/shell.c b/src/shell.c > index cd94aa5..d7e2d1e 100644 > --- a/src/shell.c > +++ b/src/shell.c > @@ -3485,6 +3485,15 @@ weston_surface_set_initial_position (struct > weston_surface *surface, > } > > static void > +surface_restore_alpha(struct weston_surface_animation *animation, void *data) > +{ > + struct weston_surface *surface = data; > + > + surface->alpha = 1.0; > + weston_surface_geometry_dirty(surface); > +} > + > +static void > map(struct desktop_shell *shell, struct weston_surface *surface, > int32_t width, int32_t height, int32_t sx, int32_t sy) > { > @@ -3576,10 +3585,12 @@ map(struct desktop_shell *shell, struct > weston_surface *surface, > { > switch (shell->win_animation_type) { > case ANIMATION_FADE: > - weston_fade_run(surface, 0.0, 1.0, 300.0, NULL, NULL); > + weston_fade_run(surface, 0.0, 1.0, 300.0, > + surface_restore_alpha, surface); > break; > case ANIMATION_ZOOM: > - weston_zoom_run(surface, 0.5, 1.0, NULL, NULL); > + weston_zoom_run(surface, 0.5, 1.0, > + surface_restore_alpha, surface); > break; > default: > break; > -- > 1.8.1.2 > > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
