summaryrefslogtreecommitdiff
path: root/src/synapticsstr.h
diff options
context:
space:
mode:
authorTero Saarni <tero.saarni@gmail.com>2009-07-12 19:24:40 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-16 14:54:15 +1000
commit0c3fbceb1b2a18f92166fe75c44b5aaada693c4b (patch)
treebb25e5b2285ad29da4ba293fcec9cca1271bef2e /src/synapticsstr.h
parentafb60a0b2497c5d08cbd1739fa8ae6585c428881 (diff)
Add configurable x/y resolution to fix sensitivity on wide touchpads.
Synaptics uses anisotropic coordinate system. On some wide touchpads vertical resolution can be twice as high as horizontal which causes unequal sensitivity on x/y directions. VertResolution and HorizResolution can be used to set the resolution. The ratio of the values is used to compensate x/y sensitivity. The properties are configured automatically if touchpad reports resolution and if running on linux 2.6.31 or newer. Fixes xorg bug #18351. Signed-off-by: Tero Saarni <tero.saarni@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/synapticsstr.h')
-rw-r--r--src/synapticsstr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 87af600..8348e72 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -164,6 +164,8 @@ typedef struct _SynapticsParameters
double press_motion_max_factor; /* factor applied on speed when finger pressure is at minimum */
Bool grab_event_device; /* grab event device for exclusive use? */
Bool tap_and_drag_gesture; /* Switches the tap-and-drag gesture on/off */
+ unsigned int resolution_horiz; /* horizontal resolution of touchpad in units/mm */
+ unsigned int resolution_vert; /* vertical resolution of touchpad in units/mm */
} SynapticsParameters;
@@ -224,9 +226,12 @@ typedef struct _SynapticsPrivateRec
palm/finger contact disappears */
int prev_z; /* previous z value, for palm detection */
int avg_width; /* weighted average of previous fingerWidth values */
+ double horiz_coeff; /* normalization factor for x coordintes */
+ double vert_coeff; /* normalization factor for y coordintes */
int minx, maxx, miny, maxy; /* min/max dimensions as detected */
int minp, maxp, minw, maxw; /* min/max pressure and finger width as detected */
+ int resx, resy; /* resolution of coordinates as detected in units/mm */
Bool has_left; /* left button detected for this device */
Bool has_right; /* right button detected for this device */
Bool has_middle; /* middle button detected for this device */