[PATCH] dix: fix inverted handling of legacy scroll button events

Jeremy Huddleston jeremyhu at apple.com
Tue Oct 4 17:59:04 PDT 2011


Can you add a reference to the commit that introduced this regression to the commit message?

On Oct 4, 2011, at 2:55 PM, Max Schwarz wrote:

> This bug led to inverted scrolling axes with legacy drivers that
> do not support smooth scrolling classes.
> 
> Signed-off-by: Max Schwarz <Max at x-quadraht.de>
> ---
> Applies on Peter's next branch.
> 
> dix/getevents.c |    9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/dix/getevents.c b/dix/getevents.c
> index ebf2653..97c3937 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -1330,21 +1330,22 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
>         double val, adj;
>         int axis;
> 
> +        /* Up is negative on valuators, down positive */
>         switch (buttons) {
>         case 4:
> -            adj = 1.0;
> +            adj = -1.0;
>             axis = v_scroll_axis;
>             break;
>         case 5:
> -            adj = -1.0;
> +            adj = 1.0;
>             axis = v_scroll_axis;
>             break;
>         case 6:
> -            adj = 1.0;
> +            adj = -1.0;
>             axis = h_scroll_axis;
>             break;
>         case 7:
> -            adj = -1.0;
> +            adj = 1.0;
>             axis = h_scroll_axis;
>             break;
>         default:
> -- 
> 1.7.4.1
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 

---
Jeremy Huddleston

Rebuild Sudan
 - Board of Directors
 - http://www.rebuildsudan.org

Berkeley Foundation for Opportunities in Information Technology
 - Advisory Board
 - http://www.bfoit.org



More information about the xorg-devel mailing list