[PATCH xserver 3/3] xwayland: Expose all NBUTTONS buttons on the pointer

Olivier Fourdan ofourdan at redhat.com
Fri Jun 17 14:42:39 UTC 2016


----- Original Message -----
> The call to 'InitButtonClassDeviceStruct' which initializes the pointer
> buttons only results in the first three buttons being created due to a
> hardcoded '3'. In order to expose all the buttons defined in the
> btn_labels array, we subtitute 'NBUTTONS' in its place.
> 
> Signed-off-by: Jason Gerecke <jason.gerecke at wacom.com>
> ---
>  hw/xwayland/xwayland-input.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index bc30e29..6f84408 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -103,7 +103,7 @@ xwl_pointer_proc(DeviceIntPtr device, int what)
>          if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control))
>              return BadValue;
>  
> -        if (!InitButtonClassDeviceStruct(device, 3, btn_labels, map))
> +        if (!InitButtonClassDeviceStruct(device, NBUTTONS, btn_labels, map))
>              return BadValue;
>  
>          return Success;
> --
> 2.8.3

Looks right to me.

Before "xinput get-button-map" on the xwayland pointer would list only 3 buttons whereas with that patch I get the 10 buttons.

Reviewed-by: Olivier Fourdan <ofourdan at redhat.com>

Cheers,
Olivier


More information about the xorg-devel mailing list