diff options
author | Alexandr Shadchin <alexandr.shadchin@gmail.com> | 2011-08-26 18:42:08 +0600 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-09-02 16:03:42 +1000 |
commit | 3489e2467d43217971f17b9344fc2772cc0f164d (patch) | |
tree | f28c3c0e63e334ccee2687b120cde49cc010fd52 /src | |
parent | 98e8481cf4911506403b8963fc32c61a74cf679e (diff) |
The correct maximum values for pressure and finger width
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 7a72af1ce105fd857214bb641a8fa2cfd150a5f7)
Diffstat (limited to 'src')
-rw-r--r-- | src/synaptics.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/synaptics.c b/src/synaptics.c index cf91b9f..d036bdf 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -231,7 +231,7 @@ SanitizeDimensions(InputInfoPtr pInfo) if (priv->minp >= priv->maxp) { priv->minp = 0; - priv->maxp = 256; + priv->maxp = 255; xf86IDrvMsg(pInfo, X_PROBED, "invalid pressure range. defaulting to %d - %d\n", @@ -241,7 +241,7 @@ SanitizeDimensions(InputInfoPtr pInfo) if (priv->minw >= priv->maxw) { priv->minw = 0; - priv->maxw = 16; + priv->maxw = 15; xf86IDrvMsg(pInfo, X_PROBED, "invalid finger width range. defaulting to %d - %d\n", @@ -444,7 +444,7 @@ static void set_default_parameters(InputInfoPtr pInfo) horizHyst = pars->hyst_x >= 0 ? pars->hyst_x : diag * 0.005; vertHyst = pars->hyst_y >= 0 ? pars->hyst_y : diag * 0.005; - range = priv->maxp - priv->minp; + range = priv->maxp - priv->minp + 1; /* scaling based on defaults and a pressure of 256 */ fingerLow = priv->minp + range * (25.0/256); @@ -457,7 +457,7 @@ static void set_default_parameters(InputInfoPtr pInfo) pressureMotionMaxZ = priv->minp + range * (160.0/256); palmMinZ = priv->minp + range * (200.0/256); - range = priv->maxw - priv->minw; + range = priv->maxw - priv->minw + 1; /* scaling based on defaults below and a tool width of 16 */ palmMinWidth = priv->minw + range * (10.0/16); |