linuxwacom / xf86-input-wacom

X.Org driver for Wacom devices
356 stars 46 forks source link

Allow negative panscroll threshold for inverted scrolling #260

Closed jigpu closed 2 years ago

jigpu commented 2 years ago

The driver's "pan" feature allows you to send scroll events by holding down a defined stylus button and dragging the pen. Dragging the pen from top to bottom will cause the driver to send scroll-up events, and vice-versa. This simulates physically dragging the page under the cursor and works particularly well with display tablets.

The rate at which scroll events are sent is controlled by comparing the distance the pen has moved "down" to a defined threshold value. If the distance exceeds the threshold a scroll-up event is sent; if it exceeds the the threshold * -1 a scroll-down event is sent.

This commit allows the driver to accept negative threshold values to produce an inverted scrolling behavior (i.e. dragging the pen from top to bottom causes scroll-down events instead of scroll-up). To do this we just relax the checks performed at device configuration and property setting (affecting the "PanScrollThreshold" driver option and "Wacom Panscroll Threshold" Xinput property, respectively).

Link: https://github.com/linuxwacom/xf86-input-wacom/issues/257 Signed-off-by: Jason Gerecke jason.gerecke@wacom.com

MikuChan03 commented 2 years ago

Big facts.