evdev: if we have a quick scroll button release, skip middle button emulation

The only difference between evdev_pointer_notify_physical_button() and
evdev_pointer_notify_button() is that the former filters out middle button
emulations where applicable.

Doing so effectively disables using a button for scrolling that is also used
for middle button emulation. This is intentional, it is a niche use-case
(and prone to timer races). OTOH some devices exist that only have two buttons
on the pointing stick and require button scrolling. This use-case is given
preference.

https://bugs.freedesktop.org/show_bug.cgi?id=94856

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2016-04-11 08:55:30 +10:00
parent 4f74f8e685
commit d76263a00f

View file

@ -507,11 +507,11 @@ evdev_button_scroll_button(struct evdev_device *device,
} else {
/* If the button is released quickly enough emit the
* button press/release events. */
evdev_pointer_notify_physical_button(device,
evdev_pointer_notify_button(device,
device->scroll.button_down_time,
device->scroll.button,
LIBINPUT_BUTTON_STATE_PRESSED);
evdev_pointer_notify_physical_button(device, time,
evdev_pointer_notify_button(device, time,
device->scroll.button,
LIBINPUT_BUTTON_STATE_RELEASED);
}