[PATCH libinput 1/4] evdev: if we have a quick scroll button release, skip middle button emulation

Hans de Goede hdegoede at redhat.com
Mon Apr 11 07:39:57 UTC 2016


Hi,

On 11-04-16 05:54, Peter Hutterer wrote:
> 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 at who-t.net>

Patch looks good to me:

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

Regards,

Hans





> ---
>   src/evdev.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index 6bb8986..9be4a96 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -505,11 +505,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);
>   		}
>


More information about the wayland-devel mailing list