[PATCH libinput] Added missing button range for pad on CTH-680

Hans de Goede hdegoede at redhat.com
Mon Feb 13 07:48:46 UTC 2017


Hi,

On 13-02-17 07:57, Peter Hutterer wrote:
> From: Sakse Dalum <s at srq.re>
>
> This device has BTN_LEFT, BTN_RIGHT, BTN_FORWARD and BTN_BACK, add the
> missing range to the pad init function.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=99785
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

Patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans



> ---
>  src/evdev-tablet-pad.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/evdev-tablet-pad.c b/src/evdev-tablet-pad.c
> index bed43b6..6be53b5 100644
> --- a/src/evdev-tablet-pad.c
> +++ b/src/evdev-tablet-pad.c
> @@ -542,6 +542,11 @@ pad_init_buttons(struct pad_dispatch *pad,
>  			pad->button_map[code] = map++;
>  	}
>
> +	for (code = BTN_LEFT; code < BTN_LEFT + 7; code++) {
> +		if (libevdev_has_event_code(device->evdev, EV_KEY, code))
> +			pad->button_map[code] = map++;
> +	}
> +
>  	pad->nbuttons = map;
>  }
>
>


More information about the wayland-devel mailing list