[PATCH synaptics 2/2] Add a delay between the second button down-up event of double taps

Peter Hutterer peter.hutterer at who-t.net
Thu Jan 15 19:24:31 PST 2015


On Thu, Jan 15, 2015 at 10:04:17PM +0100, Gabriele Mazzotta wrote:
> Some applications ignore the second tap of double taps because of the
> lack of a delay between the button down and button up events.
> 
> Prevent this by replacing the transition from TS_2B to TS_START with a
> transition from TS_2B to TS_SINGLETAP that emits only a button down
> event. The button up event will be emitted when transitioning from
> TS_SINGLETAP to TS_START.
> 
> In addition, decrease the default value of MaxDoubleTapTime from 180 ms
> to 100 ms in order to make double taps faster.

Hmm, the problem here is now that MaxDoubleTapTime is now the sum of
ClickTime and MaxDoubleTapTime. That's ok if we hadn't exposed those as
toggles but will break user's custom configurations. Even with your change
we go from 180 to 200, anyone who has this option set goes to value +
ClickTime.

Easy way around this would be to add clickTime to maxDoubleTapTime's
default, check the option, then subtract it again after to leave the double
tap timeout as the difference between the two.

     pars->click_time = xf86SetIntOption(opts, "ClickTime", 100);
     pars->tap_time_2 = xf86SetIntOption(opts,
                                         "MaxDoubleTapTime", 
                                         pars->clicktime + 80);
     pars->tap_time_2 -= pars->clicktime;

That should work, no?

Cheers,
   Peter


More information about the xorg-devel mailing list