summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.co.uk>2011-03-21 16:01:29 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2011-08-25 09:50:32 +1000
commita24c44375025576dd600ccf370ba365e5d94dc22 (patch)
tree8340682a0221cb7485a1f3b2c12b374107b4f4b5
parent627b09e5bd0726ad31bfeb4f07b8f8287d8ec46f (diff)
Fix pressure->motion property format
CARD32, not float. Signed-off-by: Derek Foreman <derek.foreman@collabora.co.uk> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--include/synaptics-properties.h2
-rw-r--r--src/properties.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
index 77a1806..c550cef 100644
--- a/include/synaptics-properties.h
+++ b/include/synaptics-properties.h
@@ -133,7 +133,7 @@
/* FLOAT, 2 values, speed, friction */
#define SYNAPTICS_PROP_COASTING_SPEED "Synaptics Coasting Speed"
-/* 32 bit, 2 values, min, max */
+/* CARD32, 2 values, min, max */
#define SYNAPTICS_PROP_PRESSURE_MOTION "Synaptics Pressure Motion"
/* FLOAT, 2 values, min, max */
diff --git a/src/properties.c b/src/properties.c
index f5f78e3..5f11cf2 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -266,7 +266,7 @@ InitDeviceProperties(InputInfoPtr pInfo)
values[0] = para->press_motion_min_z;
values[1] = para->press_motion_max_z;
- prop_pressuremotion = InitAtom(pInfo->dev, SYNAPTICS_PROP_PRESSURE_MOTION, 32, 2, values);
+ prop_pressuremotion = InitTypedAtom(pInfo->dev, SYNAPTICS_PROP_PRESSURE_MOTION, XA_CARDINAL, 32, 2, values);
fvalues[0] = para->press_motion_min_factor;
fvalues[1] = para->press_motion_max_factor;
@@ -652,11 +652,11 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
para->coasting_friction = coast_speeds[1];
} else if (property == prop_pressuremotion)
{
- float *press;
- if (prop->size != 2 || prop->format != 32 || prop->type != float_type)
+ CARD32 *press;
+ if (prop->size != 2 || prop->format != 32 || prop->type != XA_CARDINAL)
return BadMatch;
- press = (float*)prop->data;
+ press = (CARD32*)prop->data;
if (press[0] > press[1])
return BadValue;