Re: Precise scrolling for wsmouse

Chavdar Ivanov <[email protected]> Thu, 23 Sep 2021 00:11:31 +0100
Newsgroups gmane.os.netbsd.devel.x11
Message-ID <[email protected]>
On 9/21/21 11:31 PM, nia wrote:
> Greetz tech-x11,
>
> OpenBSD has WSCONS_EVENT_HSCROLL and WSCONS_EVENT_VSCROLL.
> These are useful for scrolling with precise coordinates.
>
> The following diff adds support for HSCROLL and VSCROLL
> to our wsmouse(4) and synaptics(4), where it's used to provide
> much smoother two-finger and trackpoint scrolling.
> The synaptics driver also gets some simplification.
> I think this is much better than its previous state.
>
> Also attached is a diff with the necessary changes to
> xf86-input-ws.
>   



On a -current system from today after applying the patches I get:

...

/home/sysbuild/src/sys/rump/dev/lib/libwscons/../../../../dev/wscons/wsmouse.c: 
In function 'wsmouse_precision_scroll':
/home/sysbuild/src/sys/rump/dev/lib/libwscons/../../../../dev/wscons/wsmouse.c:536:26: 
error: 'WSCONS_EVENT_HSCROLL' undeclared (first use in this function); 
did you mean 'W
SCONS_EVENT_ASCII'?
   536 |   events[nevents].type = WSCONS_EVENT_HSCROLL;
       |                          ^~~~~~~~~~~~~~~~~~~~
       |                          WSCONS_EVENT_ASCII
/home/sysbuild/src/sys/rump/dev/lib/libwscons/../../../../dev/wscons/wsmouse.c:536:26: 
note: each undeclared identifier is reported only once for each function 
it appears in
/home/sysbuild/src/sys/rump/dev/lib/libwscons/../../../../dev/wscons/wsmouse.c:542:26: 
error: 'WSCONS_EVENT_VSCROLL' undeclared (first use in this function); 
did you mean 'W
SCONS_EVENT_ASCII'?
   542 |   events[nevents].type = WSCONS_EVENT_VSCROLL;
       |                          ^~~~~~~~~~~~~~~~~~~~
       |                          WSCONS_EVENT_ASCII
*** Failed target: wsmouse.pico

....


Otherwise I'd be interested to test - my synaptics trackpad is very 
sensitive to touch, anything to get it better is welcome (I've tried a 
number of sysctl parameters, it is usable now, but I still prefer to 
attach a mouse when running NetBSD on it).


> Later I should make it so scrolling speed and
> direction configurable in wsconsctl -m. But right now,
> I should sleep.
>
> Testing would be nice.
>
> I have in my xorg.conf:
>
> Section "ServerLayout"
>          Identifier      "layout"
>          InputDevice     "Mouse0" "CorePointer"
> EndSection
>   
> Section "InputDevice"
>          Identifier  "Mouse0"
>          Driver      "ws"
>          Option "Device" "/dev/wsmouse0"
> EndSection