diff options
author | Marcel Dejean <Doodle777@gmail.com> | 2009-02-13 19:00:07 -0500 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-20 11:32:46 +1000 |
commit | 3ddc067c873479d886d6bc576db9dcb6318c88af (patch) | |
tree | 2ed4e945bac31d55b6e24a1b9f7f96ef06c904d4 /src/properties.c | |
parent | b0704a9d3c7a25e0b160414983025db9d14be496 (diff) |
two-finger emulation through fingerWidth
Signed-off-by: Christoph Brill <egore911@egore911.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/properties.c')
-rw-r--r-- | src/properties.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/properties.c b/src/properties.c index 8b8334d..681f77f 100644 --- a/src/properties.c +++ b/src/properties.c @@ -52,6 +52,7 @@ Atom prop_tap_durations = 0; Atom prop_tap_fast = 0; Atom prop_middle_timeout = 0; Atom prop_twofinger_pressure = 0; +Atom prop_twofinger_width = 0; Atom prop_scrolldist = 0; Atom prop_scrolledge = 0; Atom prop_scrolltwofinger = 0; @@ -172,6 +173,8 @@ InitDeviceProperties(LocalDevicePtr local) 32, 1, ¶->emulate_mid_button_time); prop_twofinger_pressure = InitAtom(local->dev, SYNAPTICS_PROP_TWOFINGER_PRESSURE, 32, 1, ¶->emulate_twofinger_z); + prop_twofinger_width = InitAtom(local->dev, SYNAPTICS_PROP_TWOFINGER_WIDTH, + 32, 1, ¶->emulate_twofinger_w); values[0] = para->scroll_dist_vert; values[1] = para->scroll_dist_horiz; @@ -340,6 +343,12 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, return BadMatch; para->emulate_twofinger_z = *(INT32*)prop->data; + } else if (property == prop_twofinger_width) + { + if (prop->size != 1 || prop->format != 32 || prop->type != XA_INTEGER) + return BadMatch; + + para->emulate_twofinger_w = *(INT32*)prop->data; } else if (property == prop_scrolldist) { INT32 *dist; |