[PATCH vmmouse] Fix wheel button labels

Peter Hutterer peter.hutterer at who-t.net
Sun Jul 13 15:56:01 PDT 2014


On Sat, Jul 12, 2014 at 07:29:24AM +0200, Loïc Yhuel wrote:
> Wheel is using buttons 4/5, but btn_labels array is 0-based.
> It matches mouse and evdev drivers, and fixes wheel in Qt5.3.

pushed, thanks.

   336f863..de58228  master -> master

Cheers,
   Peter

> ---
>  src/vmmouse.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/vmmouse.c b/src/vmmouse.c
> index 523f4fd..7ed94e9 100644
> --- a/src/vmmouse.c
> +++ b/src/vmmouse.c
> @@ -868,10 +868,10 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
>        btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
>        btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
>        btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
> -      btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
> -      btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
> -      btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
> -      btn_labels[7] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
> +      btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
> +      btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
> +      btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
> +      btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
>        /* other buttons are unknown */
>  
>  #ifdef ABS_VALUATOR_AXES
> -- 
> 2.0.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
> 


More information about the xorg-devel mailing list