summaryrefslogtreecommitdiff
path: root/src/properties.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-01-17 08:24:35 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-01-17 08:24:35 +1000
commite0069c154440305ece6def92a9813a9f8004b2fb (patch)
tree7e1ac16c9cca699e6727edb9c766f00d0d6fbbbc /src/properties.c
parent48fbf44a3903bc6975add21be35586914a53c310 (diff)
Revert "Purge scrollbuttons (repeat)"
This reverts commit 0903d99ada1755f11a2a5cbf89a345de896e18ec. Scroll buttons are still present in some modern devices, e.g. the Fujitsu Lifebook E782 and others in the series. Conflicts: include/synaptics.h man/synaptics.man src/synaptics.c
Diffstat (limited to 'src/properties.c')
-rw-r--r--src/properties.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/properties.c b/src/properties.c
index 797f1da..0041544 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -68,6 +68,9 @@ Atom prop_speed = 0;
Atom prop_edgemotion_pressure = 0;
Atom prop_edgemotion_speed = 0;
Atom prop_edgemotion_always = 0;
+Atom prop_buttonscroll = 0;
+Atom prop_buttonscroll_repeat = 0;
+Atom prop_buttonscroll_time = 0;
Atom prop_off = 0;
Atom prop_lockdrags = 0;
Atom prop_lockdrags_time = 0;
@@ -247,6 +250,22 @@ InitDeviceProperties(InputInfoPtr pInfo)
fvalues[3] = 0;
prop_speed = InitFloatAtom(pInfo->dev, SYNAPTICS_PROP_SPEED, 4, fvalues);
+ if (priv->has_scrollbuttons) {
+ values[0] = para->updown_button_scrolling;
+ values[1] = para->leftright_button_scrolling;
+ prop_buttonscroll =
+ InitAtom(pInfo->dev, SYNAPTICS_PROP_BUTTONSCROLLING, 8, 2, values);
+
+ values[0] = para->updown_button_repeat;
+ values[1] = para->leftright_button_repeat;
+ prop_buttonscroll_repeat =
+ InitAtom(pInfo->dev, SYNAPTICS_PROP_BUTTONSCROLLING_REPEAT, 8, 2,
+ values);
+ prop_buttonscroll_time =
+ InitAtom(pInfo->dev, SYNAPTICS_PROP_BUTTONSCROLLING_TIME, 32, 1,
+ &para->scroll_button_repeat);
+ }
+
prop_off =
InitAtom(pInfo->dev, SYNAPTICS_PROP_OFF, 8, 1, &para->touchpad_off);
prop_lockdrags =
@@ -518,6 +537,43 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
para->max_speed = speed[1];
para->accl = speed[2];
}
+ else if (property == prop_buttonscroll) {
+ BOOL *scroll;
+
+ if (!priv->has_scrollbuttons)
+ return BadMatch;
+
+ if (prop->size != 2 || prop->format != 8 || prop->type != XA_INTEGER)
+ return BadMatch;
+
+ scroll = (BOOL *) prop->data;
+ para->updown_button_scrolling = scroll[0];
+ para->leftright_button_scrolling = scroll[1];
+
+ }
+ else if (property == prop_buttonscroll_repeat) {
+ BOOL *repeat;
+
+ if (!priv->has_scrollbuttons)
+ return BadMatch;
+
+ if (prop->size != 2 || prop->format != 8 || prop->type != XA_INTEGER)
+ return BadMatch;
+
+ repeat = (BOOL *) prop->data;
+ para->updown_button_repeat = repeat[0];
+ para->leftright_button_repeat = repeat[1];
+ }
+ else if (property == prop_buttonscroll_time) {
+ if (!priv->has_scrollbuttons)
+ return BadMatch;
+
+ if (prop->size != 1 || prop->format != 32 || prop->type != XA_INTEGER)
+ return BadMatch;
+
+ para->scroll_button_repeat = *(INT32 *) prop->data;
+
+ }
else if (property == prop_off) {
CARD8 off;