Re: [PATCH libinput 04/20] touchpad: don't allow tapping while any button is down
On Tue, Apr 15, 2014 at 02:28:01PM +0200, Hans de Goede wrote: From: Peter Hutterer peter.hutte...@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.hutte...@who-t.net Signed-off-by: Hans de Goede hdego...@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@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
Re: [PATCH libinput 04/20] touchpad: don't allow tapping while any button is down
On Wed, Apr 23, 2014 at 11:36:05PM +0200, Jonas Ådahl wrote: On Tue, Apr 15, 2014 at 02:28:01PM +0200, Hans de Goede wrote: From: Peter Hutterer peter.hutte...@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 fwiw, that's true for old-style touchpads but I don't think the xorg clickpad code can handle this, but you're right, we should support this. Cheers, Peter 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. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: Hans de Goede hdego...@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@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 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH libinput 04/20] touchpad: don't allow tapping while any button is down
From: Peter Hutterer peter.hutte...@who-t.net Immediately set the state to DEAD, waiting for the tap release to go back to idle. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: Hans de Goede hdego...@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@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel