summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/synaptics-properties.h4
-rw-r--r--man/synaptics.man9
-rw-r--r--src/properties.c12
3 files changed, 25 insertions, 0 deletions
diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
index f1591a4..b944adb 100644
--- a/include/synaptics-properties.h
+++ b/include/synaptics-properties.h
@@ -145,4 +145,8 @@
/* 8 bit (BOOL), 1 value, tap-and-drag */
#define SYNAPTICS_PROP_GESTURES "Synaptics Gestures"
+/* 8 bit (BOOL), 5 values (read-only), has_left, has_middle, has_right,
+ * has_double, has_triple */
+#define SYNAPTICS_PROP_CAPABILITIES "Synaptics Capabilities"
+
#endif /* _SYNAPTICS_PROPERTIES_H_ */
diff --git a/man/synaptics.man b/man/synaptics.man
index 372ce2d..4f8b2d4 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -809,6 +809,15 @@ FLOAT, 2 values, min, max.
.BI "Synaptics Gestures"
8 bit (BOOL), 1 value, tap-and-drag.
+.TP 7
+.BI "Synaptics Capabilities"
+This read-only property expresses the physical capability of the touchpad,
+most notably whether the touchpad hardware supports multi-finger tapping and
+scrolling.
+
+8 bit (BOOL), 5 values (read-only), has left button, has middle button, has
+right button, two-finger detection, three-finger detection.
+
.SH "NOTES"
There is an example hal policy file in
.I ${sourcecode}/fdi/11-x11-synaptics.fdi
diff --git a/src/properties.c b/src/properties.c
index 886b4c1..70b59e0 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -81,6 +81,7 @@ Atom prop_pressuremotion = 0;
Atom prop_pressuremotion_factor = 0;
Atom prop_grab = 0;
Atom prop_gestures = 0;
+Atom prop_capabilities = 0;
static Atom
InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
@@ -254,6 +255,13 @@ InitDeviceProperties(LocalDevicePtr local)
values[0] = para->tap_and_drag_gesture;
prop_gestures = InitAtom(local->dev, SYNAPTICS_PROP_GESTURES, 8, 1, values);
+
+ values[0] = priv->has_left;
+ values[1] = priv->has_middle;
+ values[2] = priv->has_right;
+ values[3] = priv->has_double;
+ values[4] = priv->has_triple;
+ prop_capabilities = InitAtom(local->dev, SYNAPTICS_PROP_CAPABILITIES, 8, 5, values);
}
int
@@ -600,6 +608,10 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
return BadMatch;
para->grab_event_device = *(BOOL*)prop->data;
+ } else if (property == prop_capabilities)
+ {
+ /* read-only */
+ return BadValue;
}
return Success;