On Thu, Sep 27, 2012 at 11:04 AM, Jonas Ådahl <jad...@gmail.com> wrote:

> Signed-off-by: Jonas Ådahl <jad...@gmail.com>
> ---
>  src/shell.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/shell.c b/src/shell.c
> index e2715d6..6193bd2 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -2361,7 +2361,7 @@ static void
>  surface_opacity_binding(struct wl_seat *seat, uint32_t time, uint32_t
> axis,
>                         wl_fixed_t value, void *data)
>  {
> -       float step = 0.05;
> +       float step = 0.005;
>         struct shell_surface *shsurf;
>         struct weston_surface *surface =
>                 (struct weston_surface *) seat->pointer->focus;
> @@ -2373,7 +2373,7 @@ surface_opacity_binding(struct wl_seat *seat,
> uint32_t time, uint32_t axis,
>         if (!shsurf)
>                 return;
>
> -       surface->alpha += wl_fixed_to_double(value) * step;
> +       surface->alpha -= wl_fixed_to_double(value) * step;
>
>         if (surface->alpha > 1.0)
>                 surface->alpha = 1.0;
> @@ -2403,8 +2403,9 @@ do_zoom(struct wl_seat *seat, uint32_t time,
> uint32_t key, uint32_t axis,
>                         else if (key == KEY_PAGEDOWN)
>                                 increment = -output->zoom.increment;
>                         else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL)
> +                               /* For every pixel zoom 20th of a step */
>                                 increment = output->zoom.increment *
> -                                           wl_fixed_to_double(value);
> +                                           -wl_fixed_to_double(value) /
> 20.0;
>                         else
>                                 increment = 0;
>
> --
> 1.7.9.5
>
>
This patch effectively breaks surface_opacity_binding for the desktop mouse
case. It reverses the order and makes the increment far too small. Maybe if
you can explain what you are trying to do here, we can find a solution that
doesn't break the current behaviour.



Scott
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to