summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Shadchin <alexandr.shadchin@gmail.com>2011-08-26 18:42:08 +0600
committerPeter Hutterer <peter.hutterer@who-t.net>2011-08-29 13:48:23 +1000
commit7a72af1ce105fd857214bb641a8fa2cfd150a5f7 (patch)
tree248379c3466c62170f12b5eaeaa90632e4340b9d
parent45d4a6bec01deac5cca6639c55062b110462155f (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>
-rw-r--r--src/synaptics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 994bf4c..c44d1f7 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -246,7 +246,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",
@@ -256,7 +256,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",
@@ -459,7 +459,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);
@@ -472,7 +472,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);