Hi,

On 05/22/2014 03:45 AM, Peter Hutterer wrote:
> On Tue, May 20, 2014 at 04:34:59PM +0200, Hans de Goede wrote:
>> We should never get any non left button events on clickpads, but if we
>> do these might confuse our state, so complain about it and ignore these.
>>
>> Signed-off-by: Hans de Goede <hdego...@redhat.com>
>> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net>
>> ---
>>  src/evdev-mt-touchpad-buttons.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/src/evdev-mt-touchpad-buttons.c 
>> b/src/evdev-mt-touchpad-buttons.c
>> index 76e6843..f1d65be 100644
>> --- a/src/evdev-mt-touchpad-buttons.c
>> +++ b/src/evdev-mt-touchpad-buttons.c
>> @@ -367,6 +367,13 @@ tp_process_button(struct tp_dispatch *tp,
>>                uint32_t time)
>>  {
>>      uint32_t mask = 1 << (e->code - BTN_LEFT);
>> +
>> +    /* Ignore other buttons on clickpads */
>> +    if (tp->buttons.is_clickpad && e->code != BTN_LEFT) {
>> +            log_bug("received non BTN_LEFT button event on a clickpad 
>> (kernel bug?)\n");
> 
> I'd be useful to print the actual button code here.
> 
> log_bug("received %s button event on a clickpad (kernel bug?)\n",
>         libevdev_event_code_get_name(tp->device->evdev, EV_KEY, e->code));

Done.

Regards,

Hans

> 
> Cheers,
>    Peter
> 
> 
>> +            return 0;
>> +    }
>> +
>>      if (e->value) {
>>              tp->buttons.state |= mask;
>>              tp->queued |= TOUCHPAD_EVENT_BUTTON_PRESS;
>> -- 
>> 1.9.0
>>
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>>
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to