[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
Tue Feb 17 22:57:51 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.
> 
> Signed-off-by: Gabriele Mazzotta <gabriele.mzt at gmail.com>

ok, I think I've wasted enough of your time on this. sorry, bit busy here
and I don't have the time I was hoping for to review this as I should. But
not doing anything isn't any better either, so I've pushed this version of
the patch now. We'll deal with the fallout if there is any later.

   0644453..37d34f0  master -> master

Thanks for your patience though, sorry about the delay.

Cheers,
   Peter

> ---
>  docs/tapndrag.dia  | 171 ++++++++++++++++++++++++++---------------------------
>  src/synaptics.c    |  27 ++-------
>  src/synapticsstr.h |   1 -
>  3 files changed, 90 insertions(+), 109 deletions(-)
> 
> diff --git a/docs/tapndrag.dia b/docs/tapndrag.dia
> index 27b2239..0e91873 100644
> --- a/docs/tapndrag.dia
> +++ b/docs/tapndrag.dia
> @@ -458,7 +458,7 @@
>        </dia:attribute>
>        <dia:connections>
>          <dia:connection handle="0" to="O1" connection="6"/>
> -        <dia:connection handle="1" to="O35" connection="1"/>
> +        <dia:connection handle="1" to="O34" connection="1"/>
>        </dia:connections>
>      </dia:object>
>      <dia:object type="Standard - Line" version="0" id="O8">
> @@ -578,37 +578,6 @@
>      </dia:object>
>      <dia:object type="Standard - BezierLine" version="0" id="O12">
>        <dia:attribute name="obj_pos">
> -        <dia:point val="4.29223,19.8814"/>
> -      </dia:attribute>
> -      <dia:attribute name="obj_bb">
> -        <dia:rectangle val="0.617308,7.22332;10.3763,19.9508"/>
> -      </dia:attribute>
> -      <dia:attribute name="bez_points">
> -        <dia:point val="4.29223,19.8814"/>
> -        <dia:point val="-3.17884,14.883"/>
> -        <dia:point val="1.95138,8.18572"/>
> -        <dia:point val="10.3763,7.64119"/>
> -      </dia:attribute>
> -      <dia:attribute name="corner_types">
> -        <dia:enum val="0"/>
> -        <dia:enum val="0"/>
> -      </dia:attribute>
> -      <dia:attribute name="end_arrow">
> -        <dia:enum val="1"/>
> -      </dia:attribute>
> -      <dia:attribute name="end_arrow_length">
> -        <dia:real val="0.80000000000000004"/>
> -      </dia:attribute>
> -      <dia:attribute name="end_arrow_width">
> -        <dia:real val="0.80000000000000004"/>
> -      </dia:attribute>
> -      <dia:connections>
> -        <dia:connection handle="0" to="O2" connection="0"/>
> -        <dia:connection handle="3" to="O0" connection="3"/>
> -      </dia:connections>
> -    </dia:object>
> -    <dia:object type="Standard - BezierLine" version="0" id="O13">
> -      <dia:attribute name="obj_pos">
>          <dia:point val="10.3763,27.743"/>
>        </dia:attribute>
>        <dia:attribute name="obj_bb">
> @@ -638,7 +607,7 @@
>          <dia:connection handle="3" to="O2" connection="5"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="UML - Note" version="0" id="O14">
> +    <dia:object type="UML - Note" version="0" id="O13">
>        <dia:attribute name="obj_pos">
>          <dia:point val="1.84118,30.7912"/>
>        </dia:attribute>
> @@ -701,7 +670,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          </dia:composite>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O15">
> +    <dia:object type="Standard - Text" version="1" id="O14">
>        <dia:attribute name="obj_pos">
>          <dia:point val="11.23,10.8357"/>
>        </dia:attribute>
> @@ -734,7 +703,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O16">
> +    <dia:object type="Standard - Text" version="1" id="O15">
>        <dia:attribute name="obj_pos">
>          <dia:point val="8.4912,23.1912"/>
>        </dia:attribute>
> @@ -768,7 +737,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O17">
> +    <dia:object type="Standard - Text" version="1" id="O16">
>        <dia:attribute name="obj_pos">
>          <dia:point val="17.0662,11.0357"/>
>        </dia:attribute>
> @@ -801,7 +770,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Line" version="0" id="O18">
> +    <dia:object type="Standard - Line" version="0" id="O17">
>        <dia:attribute name="obj_pos">
>          <dia:point val="13.6263,27.743"/>
>        </dia:attribute>
> @@ -829,7 +798,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          <dia:connection handle="1" to="O5" connection="3"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O19">
> +    <dia:object type="Standard - Text" version="1" id="O18">
>        <dia:attribute name="obj_pos">
>          <dia:point val="12.9069,17.2258"/>
>        </dia:attribute>
> @@ -862,7 +831,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O20">
> +    <dia:object type="Standard - Text" version="1" id="O19">
>        <dia:attribute name="obj_pos">
>          <dia:point val="5.32686,26.1857"/>
>        </dia:attribute>
> @@ -896,7 +865,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O21">
> +    <dia:object type="Standard - Text" version="1" id="O20">
>        <dia:attribute name="obj_pos">
>          <dia:point val="16.3912,13.6912"/>
>        </dia:attribute>
> @@ -929,7 +898,7 @@ TDG: Tap-and-drag gesture enabled#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O22">
> +    <dia:object type="Standard - Text" version="1" id="O21">
>        <dia:attribute name="obj_pos">
>          <dia:point val="16.1,28.5375"/>
>        </dia:attribute>
> @@ -963,18 +932,18 @@ and TDG#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O23">
> +    <dia:object type="Standard - Text" version="1" id="O22">
>        <dia:attribute name="obj_pos">
> -        <dia:point val="1.24118,9.9412"/>
> +        <dia:point val="4.54118,17.5412"/>
>        </dia:attribute>
>        <dia:attribute name="obj_bb">
> -        <dia:rectangle val="0.27868,9.4087;2.20368,10.9337"/>
> +        <dia:rectangle val="3.96368,17.0087;5.11868,18.5337"/>
>        </dia:attribute>
>        <dia:attribute name="text">
>          <dia:composite type="text">
>            <dia:attribute name="string">
>              <dia:string>#TO3
> -[D,U]#</dia:string>
> +[D]#</dia:string>
>            </dia:attribute>
>            <dia:attribute name="font">
>              <dia:font family="courier new" style="0" name="Courier"/>
> @@ -983,7 +952,7 @@ and TDG#</dia:string>
>              <dia:real val="0.80000000000000004"/>
>            </dia:attribute>
>            <dia:attribute name="pos">
> -            <dia:point val="1.24118,9.9412"/>
> +            <dia:point val="4.54118,17.5412"/>
>            </dia:attribute>
>            <dia:attribute name="color">
>              <dia:color val="#000000"/>
> @@ -997,7 +966,7 @@ and TDG#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O24">
> +    <dia:object type="Standard - Text" version="1" id="O23">
>        <dia:attribute name="obj_pos">
>          <dia:point val="24.4912,17.8412"/>
>        </dia:attribute>
> @@ -1031,7 +1000,7 @@ and TDG#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="UML - Usecase" version="0" id="O25">
> +    <dia:object type="UML - Usecase" version="0" id="O24">
>        <dia:attribute name="obj_pos">
>          <dia:point val="19.7687,32.4912"/>
>        </dia:attribute>
> @@ -1088,7 +1057,7 @@ and TDG#</dia:string>
>          </dia:composite>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="UML - Usecase" version="0" id="O26">
> +    <dia:object type="UML - Usecase" version="0" id="O25">
>        <dia:attribute name="obj_pos">
>          <dia:point val="19.7687,38.0412"/>
>        </dia:attribute>
> @@ -1145,7 +1114,7 @@ and TDG#</dia:string>
>          </dia:composite>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Line" version="0" id="O27">
> +    <dia:object type="Standard - Line" version="0" id="O26">
>        <dia:attribute name="obj_pos">
>          <dia:point val="21.3937,28.743"/>
>        </dia:attribute>
> @@ -1170,10 +1139,10 @@ and TDG#</dia:string>
>        </dia:attribute>
>        <dia:connections>
>          <dia:connection handle="0" to="O5" connection="6"/>
> -        <dia:connection handle="1" to="O25" connection="1"/>
> +        <dia:connection handle="1" to="O24" connection="1"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Line" version="0" id="O28">
> +    <dia:object type="Standard - Line" version="0" id="O27">
>        <dia:attribute name="obj_pos">
>          <dia:point val="21.3937,34.4912"/>
>        </dia:attribute>
> @@ -1197,11 +1166,11 @@ and TDG#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O25" connection="6"/>
> -        <dia:connection handle="1" to="O26" connection="1"/>
> +        <dia:connection handle="0" to="O24" connection="6"/>
> +        <dia:connection handle="1" to="O25" connection="1"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O29">
> +    <dia:object type="Standard - Text" version="1" id="O28">
>        <dia:attribute name="obj_pos">
>          <dia:point val="20.15,30.7875"/>
>        </dia:attribute>
> @@ -1234,7 +1203,7 @@ and TDG#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O30">
> +    <dia:object type="Standard - Text" version="1" id="O29">
>        <dia:attribute name="obj_pos">
>          <dia:point val="20.7108,36.3412"/>
>        </dia:attribute>
> @@ -1267,7 +1236,7 @@ and TDG#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O31">
> +    <dia:object type="Standard - Text" version="1" id="O30">
>        <dia:attribute name="obj_pos">
>          <dia:point val="16.7608,32.1912"/>
>        </dia:attribute>
> @@ -1302,7 +1271,7 @@ M#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - BezierLine" version="0" id="O32">
> +    <dia:object type="Standard - BezierLine" version="0" id="O31">
>        <dia:attribute name="obj_pos">
>          <dia:point val="20.2447,38.3341"/>
>        </dia:attribute>
> @@ -1329,11 +1298,11 @@ M#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O26" connection="0"/>
> +        <dia:connection handle="0" to="O25" connection="0"/>
>          <dia:connection handle="3" to="O5" connection="5"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - BezierLine" version="0" id="O33">
> +    <dia:object type="Standard - BezierLine" version="0" id="O32">
>        <dia:attribute name="obj_pos">
>          <dia:point val="23.0187,39.0412"/>
>        </dia:attribute>
> @@ -1360,11 +1329,11 @@ M#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O26" connection="4"/>
> +        <dia:connection handle="0" to="O25" connection="4"/>
>          <dia:connection handle="3" to="O0" connection="1"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O34">
> +    <dia:object type="Standard - Text" version="1" id="O33">
>        <dia:attribute name="obj_pos">
>          <dia:point val="31.1912,22.9412"/>
>        </dia:attribute>
> @@ -1398,7 +1367,7 @@ M#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="UML - Usecase" version="0" id="O35">
> +    <dia:object type="UML - Usecase" version="0" id="O34">
>        <dia:attribute name="obj_pos">
>          <dia:point val="10.3763,19.6385"/>
>        </dia:attribute>
> @@ -1455,7 +1424,7 @@ M#</dia:string>
>          </dia:composite>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="UML - Usecase" version="0" id="O36">
> +    <dia:object type="UML - Usecase" version="0" id="O35">
>        <dia:attribute name="obj_pos">
>          <dia:point val="3.36628,12.7652"/>
>        </dia:attribute>
> @@ -1513,12 +1482,12 @@ Tap#</dia:string>
>          </dia:composite>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O37">
> +    <dia:object type="Standard - Text" version="1" id="O36">
>        <dia:attribute name="obj_pos">
> -        <dia:point val="8.11628,16.7357"/>
> +        <dia:point val="9.61628,16.9857"/>
>        </dia:attribute>
>        <dia:attribute name="obj_bb">
> -        <dia:rectangle val="7.53878,16.1851;8.7119,17.7645"/>
> +        <dia:rectangle val="9.03878,16.4532;10.1938,17.9782"/>
>        </dia:attribute>
>        <dia:attribute name="text">
>          <dia:composite type="text">
> @@ -1533,7 +1502,7 @@ Tap#</dia:string>
>              <dia:real val="0.80000000000000004"/>
>            </dia:attribute>
>            <dia:attribute name="pos">
> -            <dia:point val="8.11628,16.7357"/>
> +            <dia:point val="9.61628,16.9857"/>
>            </dia:attribute>
>            <dia:attribute name="color">
>              <dia:color val="#000000"/>
> @@ -1547,7 +1516,7 @@ Tap#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Line" version="0" id="O38">
> +    <dia:object type="Standard - Line" version="0" id="O37">
>        <dia:attribute name="obj_pos">
>          <dia:point val="12.0013,21.6385"/>
>        </dia:attribute>
> @@ -1571,11 +1540,11 @@ Tap#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O35" connection="6"/>
> +        <dia:connection handle="0" to="O34" connection="6"/>
>          <dia:connection handle="1" to="O3" connection="1"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O39">
> +    <dia:object type="Standard - Text" version="1" id="O38">
>        <dia:attribute name="obj_pos">
>          <dia:point val="13.2364,23.2857"/>
>        </dia:attribute>
> @@ -1609,7 +1578,7 @@ Tap#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Line" version="0" id="O40">
> +    <dia:object type="Standard - Line" version="0" id="O39">
>        <dia:attribute name="obj_pos">
>          <dia:point val="5.44128,12.7652"/>
>        </dia:attribute>
> @@ -1633,11 +1602,11 @@ Tap#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O36" connection="1"/>
> +        <dia:connection handle="0" to="O35" connection="1"/>
>          <dia:connection handle="1" to="O0" connection="5"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O41">
> +    <dia:object type="Standard - Text" version="1" id="O40">
>        <dia:attribute name="obj_pos">
>          <dia:point val="7.37686,9.76072"/>
>        </dia:attribute>
> @@ -1671,7 +1640,7 @@ Tap#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Line" version="0" id="O42">
> +    <dia:object type="Standard - Line" version="0" id="O41">
>        <dia:attribute name="obj_pos">
>          <dia:point val="7.51628,14.1485"/>
>        </dia:attribute>
> @@ -1695,11 +1664,11 @@ Tap#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O36" connection="4"/>
> +        <dia:connection handle="0" to="O35" connection="4"/>
>          <dia:connection handle="1" to="O1" connection="3"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O43">
> +    <dia:object type="Standard - Text" version="1" id="O42">
>        <dia:attribute name="obj_pos">
>          <dia:point val="8.77686,12.9857"/>
>        </dia:attribute>
> @@ -1733,16 +1702,16 @@ Tap#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Arc" version="0" id="O44">
> +    <dia:object type="Standard - Arc" version="0" id="O43">
>        <dia:attribute name="obj_pos">
>          <dia:point val="10.3763,20.6385"/>
>        </dia:attribute>
>        <dia:attribute name="obj_bb">
> -        <dia:rectangle val="5.38433,15.4795;10.447,20.7092"/>
> +        <dia:rectangle val="6.86308,15.0734;10.4452,20.7074"/>
>        </dia:attribute>
>        <dia:attribute name="conn_endpoints">
>          <dia:point val="10.3763,20.6385"/>
> -        <dia:point val="5.45503,15.5502"/>
> +        <dia:point val="6.932,15.1423"/>
>        </dia:attribute>
>        <dia:attribute name="curve_distance">
>          <dia:real val="0.01"/>
> @@ -1757,11 +1726,11 @@ Tap#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O35" connection="3"/>
> -        <dia:connection handle="1" to="O36" connection="6"/>
> +        <dia:connection handle="0" to="O34" connection="3"/>
> +        <dia:connection handle="1" to="O35" connection="7"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - BezierLine" version="0" id="O45">
> +    <dia:object type="Standard - BezierLine" version="0" id="O44">
>        <dia:attribute name="obj_pos">
>          <dia:point val="22.5427,32.7841"/>
>        </dia:attribute>
> @@ -1788,11 +1757,11 @@ Tap#</dia:string>
>          <dia:real val="0.80000000000000004"/>
>        </dia:attribute>
>        <dia:connections>
> -        <dia:connection handle="0" to="O25" connection="2"/>
> +        <dia:connection handle="0" to="O24" connection="2"/>
>          <dia:connection handle="3" to="O0" connection="2"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O46">
> +    <dia:object type="Standard - Text" version="1" id="O45">
>        <dia:attribute name="obj_pos">
>          <dia:point val="26.2,27.525"/>
>        </dia:attribute>
> @@ -1825,7 +1794,7 @@ Tap#</dia:string>
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> -    <dia:object type="Standard - Arc" version="0" id="O47">
> +    <dia:object type="Standard - Arc" version="0" id="O46">
>        <dia:attribute name="obj_pos">
>          <dia:point val="13.1503,27.0359"/>
>        </dia:attribute>
> @@ -1856,7 +1825,7 @@ Tap#</dia:string>
>          <dia:connection handle="1" to="O1" connection="7"/>
>        </dia:connections>
>      </dia:object>
> -    <dia:object type="Standard - Text" version="1" id="O48">
> +    <dia:object type="Standard - Text" version="1" id="O47">
>        <dia:attribute name="obj_pos">
>          <dia:point val="19.8272,20.6239"/>
>        </dia:attribute>
> @@ -1891,5 +1860,33 @@ and !TDG
>          <dia:enum val="3"/>
>        </dia:attribute>
>      </dia:object>
> +    <dia:object type="Standard - Line" version="0" id="O48">
> +      <dia:attribute name="obj_pos">
> +        <dia:point val="5.44128,19.5885"/>
> +      </dia:attribute>
> +      <dia:attribute name="obj_bb">
> +        <dia:rectangle val="4.97124,15.4384;5.93303,19.6387"/>
> +      </dia:attribute>
> +      <dia:attribute name="conn_endpoints">
> +        <dia:point val="5.44128,19.5885"/>
> +        <dia:point val="5.45503,15.5502"/>
> +      </dia:attribute>
> +      <dia:attribute name="numcp">
> +        <dia:int val="1"/>
> +      </dia:attribute>
> +      <dia:attribute name="end_arrow">
> +        <dia:enum val="1"/>
> +      </dia:attribute>
> +      <dia:attribute name="end_arrow_length">
> +        <dia:real val="0.79999999999999993"/>
> +      </dia:attribute>
> +      <dia:attribute name="end_arrow_width">
> +        <dia:real val="0.79999999999999993"/>
> +      </dia:attribute>
> +      <dia:connections>
> +        <dia:connection handle="0" to="O2" connection="1"/>
> +        <dia:connection handle="1" to="O35" connection="6"/>
> +      </dia:connections>
> +    </dia:object>
>    </dia:layer>
>  </dia:diagram>
> diff --git a/src/synaptics.c b/src/synaptics.c
> index e6a90f2..955b042 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -671,7 +671,7 @@ set_default_parameters(InputInfoPtr pInfo)
>      pars->finger_high = xf86SetIntOption(opts, "FingerHigh", fingerHigh);
>      pars->tap_time = xf86SetIntOption(opts, "MaxTapTime", 180);
>      pars->tap_move = xf86SetIntOption(opts, "MaxTapMove", tapMove);
> -    pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180);
> +    pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 100);
>      pars->click_time = xf86SetIntOption(opts, "ClickTime", 100);
>      pars->clickpad = xf86SetBoolOption(opts, "ClickPad", pars->clickpad);       /* Probed */
>      if (pars->clickpad)
> @@ -2066,13 +2066,10 @@ HandleTapProcessing(SynapticsPrivate * priv, struct SynapticsHwState *hw,
>              SetTapState(priv, TS_SINGLETAP, now);
>          break;
>      case TS_2B:
> -        if (touch) {
> +        if (touch)
>              SetTapState(priv, TS_3, now);
> -        }
> -        else if (is_timeout) {
> -            SetTapState(priv, TS_START, now);
> -            priv->tap_button_state = TBS_BUTTON_DOWN_UP;
> -        }
> +        else if (is_timeout)
> +            SetTapState(priv, TS_SINGLETAP, now);
>          break;
>      case TS_SINGLETAP:
>          if (touch)
> @@ -3244,20 +3241,8 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
>                 (hw->down ? 0x10 : 0) |
>                 (hw->multi[2] ? 0x20 : 0) | (hw->multi[3] ? 0x40 : 0));
>  
> -    if (priv->tap_button > 0) {
> -        int tap_mask = 1 << (priv->tap_button - 1);
> -
> -        if (priv->tap_button_state == TBS_BUTTON_DOWN_UP) {
> -            if (tap_mask != (priv->lastButtons & tap_mask)) {
> -                xf86PostButtonEvent(pInfo->dev, FALSE, priv->tap_button, TRUE,
> -                                    0, 0);
> -                priv->lastButtons |= tap_mask;
> -            }
> -            priv->tap_button_state = TBS_BUTTON_UP;
> -        }
> -        if (priv->tap_button_state == TBS_BUTTON_DOWN)
> -            buttons |= tap_mask;
> -    }
> +    if (priv->tap_button > 0 && priv->tap_button_state == TBS_BUTTON_DOWN)
> +        buttons |= 1 << (priv->tap_button - 1);
>  
>      /* Post events */
>      if (finger >= FS_TOUCHED && (dx || dy) && !ignore_motion)
> diff --git a/src/synapticsstr.h b/src/synapticsstr.h
> index a17e39b..f8ab14e 100644
> --- a/src/synapticsstr.h
> +++ b/src/synapticsstr.h
> @@ -137,7 +137,6 @@ enum TapState {
>  enum TapButtonState {
>      TBS_BUTTON_UP,              /* "Virtual tap button" is up */
>      TBS_BUTTON_DOWN,            /* "Virtual tap button" is down */
> -    TBS_BUTTON_DOWN_UP          /* Send button down event + set up state */
>  };
>  
>  enum TouchpadModel {
> -- 
> 2.1.4
> 


More information about the xorg-devel mailing list