summaryrefslogtreecommitdiff
path: root/src/properties.c
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/properties.c
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/properties.c')
-rw-r--r--src/properties.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/properties.c b/src/properties.c
index 64dbc9e..43bcabb 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -82,6 +82,7 @@ Atom prop_pressuremotion_factor = 0;
Atom prop_grab = 0;
Atom prop_gestures = 0;
Atom prop_capabilities = 0;
+Atom prop_resolution = 0;
static Atom
InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
@@ -262,6 +263,11 @@ InitDeviceProperties(LocalDevicePtr local)
values[3] = priv->has_double;
values[4] = priv->has_triple;
prop_capabilities = InitAtom(local->dev, SYNAPTICS_PROP_CAPABILITIES, 8, 5, values);
+
+ values[0] = para->resolution_vert;
+ values[1] = para->resolution_horiz;
+ prop_resolution = InitAtom(local->dev, SYNAPTICS_PROP_RESOLUTION, 32, 2, values);
+
}
int
@@ -612,6 +618,10 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
{
/* read-only */
return BadValue;
+ } else if (property == prop_resolution)
+ {
+ /* read-only */
+ return BadValue;
}
return Success;