From: Derek Foreman <[email protected]> CARD32, not float.
Signed-off-by: Derek Foreman <[email protected]> Reviewed-by: Daniel Stone <[email protected]> --- include/synaptics-properties.h | 2 +- src/properties.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) v3: Fixed comment and commit message. 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; -- 1.7.5.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
