diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-12-05 09:31:11 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-12-09 11:15:28 +1000 |
commit | 09ac39309fbee01aa047dab1b0f577dc2571cdd1 (patch) | |
tree | 1d81f3f0e5ed0294f3f1671378eadb5ae0c36aea | |
parent | f4ddbde165843924195b08551d7d6d6200c44b23 (diff) |
Add missing property handler for the pressure motion factor
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 29318c1d94510cfb6d5d712e912af111f99edb42)
-rw-r--r-- | src/properties.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/properties.c b/src/properties.c index dd88fc7..797f1da 100644 --- a/src/properties.c +++ b/src/properties.c @@ -650,6 +650,19 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, para->press_motion_min_z = press[0]; para->press_motion_max_z = press[1]; } + else if (property == prop_pressuremotion_factor) { + float *press; + + if (prop->size != 2 || prop->format != 32 || prop->type != float_type) + return BadMatch; + + press = (float *) prop->data; + if (press[0] > press[1]) + return BadValue; + + para->press_motion_min_factor = press[0]; + para->press_motion_max_factor = press[1]; + } else if (property == prop_grab) { if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) return BadMatch; |