summaryrefslogtreecommitdiff
path: root/src/synaptics.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-08-08 14:57:06 +0930
committerPeter Hutterer <peter.hutterer@redhat.com>2008-08-18 14:22:10 +0930
commit59f5547d4f00cded7548b27ee780fe4c1526a087 (patch)
treef6d5db1cb48d6c6fc5bd076acafda50b98730794 /src/synaptics.c
parent58166896c43b1eb225fef9b3c3b799619a5950bf (diff)
Add support for device properties.
Exposes the SHMConfig parameters through device properties and allows run-time changes to those properties. Not exposed yet are floating point values: min_speed, max_speed, accl, trackstick_speed (SYNAPTICS_PROP_SPEED) scroll_dist_circ (SYNAPTICS_PROP_CIRCULAR_SCROLLING_DIST) coasting_speed (SYNAPTICS_PROP_COASTING_SPEED) press_motion_min_factor, press_motion_max_factor (SYNAPTICS_PROP_PRESSURE_MOTION_FACTOR)
Diffstat (limited to 'src/synaptics.c')
-rw-r--r--src/synaptics.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 9fc661a..c628600 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -72,6 +72,7 @@
#include "synaptics.h"
#include "synapticsstr.h"
+#include "synaptics-properties.h"
typedef enum {
BOTTOM_EDGE = 1,
@@ -120,6 +121,8 @@ static Bool DeviceOff(DeviceIntPtr);
static Bool DeviceClose(DeviceIntPtr);
static Bool QueryHardware(LocalDevicePtr);
+void InitDeviceProperties(LocalDevicePtr local);
+Bool SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop);
InputDriverRec SYNAPTICS = {
1,
@@ -491,6 +494,7 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
xf86CloseSerial(local->fd);
}
local->fd = -1;
+
return local;
SetupProc_fail:
@@ -660,6 +664,11 @@ DeviceInit(DeviceIntPtr dev)
if (!alloc_param_data(local))
return !Success;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
+ InitDeviceProperties(local);
+ XIRegisterPropertyHandler(local->dev, SetProperty, NULL);
+#endif
+
return Success;
}
@@ -2024,3 +2033,4 @@ QueryHardware(LocalDevicePtr local)
priv->proto_ops->DeviceOffHook(local);
return TRUE;
}
+