[PATCH synaptics] Don't release the button on TS_3 if TapAndDrag is disabled (#31854)
Chase Douglas
chase.douglas at canonical.com
Tue Apr 24 11:50:00 PDT 2012
On 04/19/2012 06:18 PM, Peter Hutterer wrote:
> TS_3 is second tap down. Unconditionally set the button as down, later, in
> HandleTapProcessing we have the required conditions to reset it to TS_START
> and TBS_BUTTON_UP.
>
> Meanwhile, TBS_BUTTON_DOWN stays down, so the second tap is counted and sent
> as button event. This restores double-tapping if TapAndDrag is disabled.
>
> X.Org Bug 31854 <http://bugs.freedesktop.org/show_bug.cgi?id=31854>
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> src/synaptics.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 0de5c01..853bfa8 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -1865,10 +1865,7 @@ SetTapState(SynapticsPrivate *priv, enum TapState tap_state, CARD32 millis)
> priv->tap_button_state = TBS_BUTTON_UP;
> break;
> case TS_3:
> - if (para->tap_and_drag_gesture)
> - priv->tap_button_state = TBS_BUTTON_DOWN;
> - else
> - priv->tap_button_state = TBS_BUTTON_UP;
> + priv->tap_button_state = TBS_BUTTON_DOWN;
> break;
> case TS_SINGLETAP:
> if (para->fast_taps)
Yes, this looks correct to me, and makes it easier to understand what is
going on, too.
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
More information about the xorg-devel
mailing list