[PATCH libinput 04/20] touchpad: don't allow tapping while any button is down
Jonas Ådahl
jadahl at gmail.com
Wed Apr 23 14:36:05 PDT 2014
On Tue, Apr 15, 2014 at 02:28:01PM +0200, Hans de Goede wrote:
> From: Peter Hutterer <peter.hutterer at who-t.net>
>
> Immediately set the state to DEAD, waiting for the tap release to go back to
> idle.
This will make it impossible to tap while for example holding a button
to keep a menu visible.
This currently works in X with synaptics:
1. right click and hold to view a menu
2. move the pointer to some menu element
3. tap to click
So we should probably rather check if the tp->buttons.state is the same
as the button that is to be notified as pressed according to the tap
state or queue and make tp_post_button_events deal with button press
counting.
Jonas
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> src/evdev-mt-touchpad-tap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c
> index bcc5700..863e004 100644
> --- a/src/evdev-mt-touchpad-tap.c
> +++ b/src/evdev-mt-touchpad-tap.c
> @@ -508,7 +508,7 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint32_t time)
> struct tp_touch *t;
> int filter_motion = 0;
>
> - if (tp->queued & TOUCHPAD_EVENT_BUTTON_PRESS)
> + if (tp->buttons.state != 0)
> tp_tap_handle_event(tp, TAP_EVENT_BUTTON, time);
>
> tp_for_each_touch(tp, t) {
> --
> 1.9.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list