summaryrefslogtreecommitdiff
path: root/src/properties.c
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-02-09 11:26:06 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-03-14 08:46:54 +1000
commit331dd969536aad48fae107e2215bfdd3e95db77e (patch)
tree2746326071917d40c6e3cb01acb7aba308a3241a /src/properties.c
parenta64e1632836067091be5ca45d0444c416bf48948 (diff)
Add clickpad device property
Add it as a writable device property. We may not know how to probe some clickpads so allow the user to override it. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/properties.c')
-rw-r--r--src/properties.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/properties.c b/src/properties.c
index 0a52801..38f21b2 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -58,6 +58,7 @@ Atom prop_finger = 0;
Atom prop_tap_time = 0;
Atom prop_tap_move = 0;
Atom prop_tap_durations = 0;
+Atom prop_clickpad = 0;
Atom prop_tap_fast = 0;
Atom prop_middle_timeout = 0;
Atom prop_twofinger_pressure = 0;
@@ -189,6 +190,8 @@ InitDeviceProperties(InputInfoPtr pInfo)
values[2] = para->click_time;
prop_tap_durations = InitAtom(pInfo->dev, SYNAPTICS_PROP_TAP_DURATIONS, 32, 3, values);
+ prop_clickpad = InitAtom(pInfo->dev, SYNAPTICS_PROP_CLICKPAD, 8, 1,
+ &para->clickpad);
prop_tap_fast = InitAtom(pInfo->dev, SYNAPTICS_PROP_TAP_FAST, 8, 1, &para->fast_taps);
prop_middle_timeout = InitAtom(pInfo->dev, SYNAPTICS_PROP_MIDDLE_TIMEOUT,
32, 1, &para->emulate_mid_button_time);
@@ -392,7 +395,11 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
para->single_tap_timeout = timeouts[0];
para->tap_time_2 = timeouts[1];
para->click_time = timeouts[2];
+ } else if (property == prop_clickpad) {
+ if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
+ return BadMatch;
+ para->clickpad = *(BOOL*)prop->data;
} else if (property == prop_tap_fast)
{
if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)