On Sun, Jan 23, 2011 at 04:14:48PM +0100, Nicolas Cavalari wrote:
> From: Nicolas Cavallari <batch...@free.fr>
> 
> Currently, when detecting a tap release, the corner tap detection
> uses the current touch position to figure out which corner it
> corresponds. The problem is that, theoretically, there is no such position
> because there is no touch. It work in mosts cases because most touchpad
> are fast enough to still have a position on release, but some aren't.
> 
> In that case, the driver do corner tap detection using the position
> given by the hardware when there is no touch, that is, (0,0), (1,5855)
> or whatever. The driver will detect them as corner tap, regardless of
> the initial touch position. On the default configuration, corner taps
> are ignored, so basically, these tap are not working.
> 
> This patch make tap detection use the initial touch position to
> detect corner taps.
> 
> Signed-off-by: Nicolas Cavallari <batch...@free.fr>

merged, thanks.

Cheers,
  Peter
> ---
>  src/synaptics.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 88bd024..783bd64 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -1538,11 +1538,12 @@ GetTimeOut(SynapticsPrivate *priv)
>  
>  static int
>  HandleTapProcessing(SynapticsPrivate *priv, struct SynapticsHwState *hw,
> -                 edge_type edge, enum FingerState finger, Bool 
> inside_active_area)
> +                 enum FingerState finger, Bool inside_active_area)
>  {
>      SynapticsParameters *para = &priv->synpara;
>      Bool touch, release, is_timeout, move;
>      int timeleft, timeout;
> +    edge_type edge;
>      int delay = 1000000000;
>  
>      if (priv->palm)
> @@ -1589,6 +1590,7 @@ HandleTapProcessing(SynapticsPrivate *priv, struct 
> SynapticsHwState *hw,
>           SetTapState(priv, TS_MOVE, hw->millis);
>           goto restart;
>       } else if (release) {
> +         edge = edge_detection(priv, priv->touch_on.x, priv->touch_on.y);
>           SelectTapButton(priv, edge);
>           /* Disable taps outside of the active area */
>           if (!inside_active_area) {
> @@ -2399,7 +2401,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState 
> *hw)
>  
>      /* tap and drag detection. Needs to be performed even if the finger is in
>       * the dead area to reset the state. */
> -    timeleft = HandleTapProcessing(priv, hw, edge, finger, 
> inside_active_area);
> +    timeleft = HandleTapProcessing(priv, hw, finger, inside_active_area);
>      if (timeleft > 0)
>       delay = MIN(delay, timeleft);
>  
> -- 
> 1.7.2.3
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to