[PATCH synaptics 17/21] Revise palm check logic

Daniel Stone daniel at fooishbar.org
Thu Jun 23 03:02:20 PDT 2011


Hi,

On Wed, Jun 15, 2011 at 12:40:07PM +0800, Daniel Kurtz wrote:
> On Wed, Jun 15, 2011 at 1:06 AM, Daniel Stone <daniel at fooishbar.org> wrote:
> > @@ -1390,17 +1394,16 @@ SynapticsDetectFinger(SynapticsPrivate *priv, struct SynapticsHwState *hw)
> >        return finger;
> >
> >     /* palm detection */
> > -    if (finger) {
> > -       if ((hw->z > para->palm_min_z) && (hw->fingerWidth > para->palm_min_width))
> > -           priv->palm = TRUE;
> > -    } else {
> > -       priv->palm = FALSE;
> > -    }
> > -    if (hw->x == 0)
> > +
> > +    if ((hw->z > para->palm_min_z) || (hw->fingerWidth > para->palm_min_width))
> 
> (1) Should these be >= ?

Maybe, but I'll just leave the existing semantics unless we have a
decent reason to change this.

> (2) Should the || be && ?

I'm sure I had a reason to make it || but I'll keep it as && and it can
be changed later if that'll help.

Cheers,
Daniel


More information about the xorg-devel mailing list