Re: Precise scrolling for wsmouse
Chavdar Ivanov <[email protected]> Thu, 23 Sep 2021 12:13:20 +0100
| Newsgroups | gmane.os.netbsd.devel.x11 |
|---|---|
| Message-ID | <CAG0OUxgYNJmnQNq-cvHXAG8y8pMcCAEMKmZqwrRYD0abQvJt4A@mail.gmail.com> |
On Thu, 23 Sept 2021 at 00:11, Chavdar Ivanov <[email protected]> wrote: > > > 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 And also xsrc/external/mit/xf86-input-ws/dist/src/ws.[hc] will have to be patched: ... /home/sysbuild/xsrc/external/mit/xf86-input-ws/dist/src/ws.c: In function 'wsDeviceInit': /home/sysbuild/xsrc/external/mit/xf86-input-ws/dist/src/ws.c:453:14: error: 'HSCROLL_AXIS' undeclared (first use in this function) 453 | axes_labels[HSCROLL_AXIS] = | ^~~~~~~~~~~~ /home/sysbuild/xsrc/external/mit/xf86-input-ws/dist/src/ws.c:453:14: note: each undeclared identifier is reported only once for each function it appears in /home/sysbuild/xsrc/external/mit/xf86-input-ws/dist/src/ws.c:455:14: error: 'VSCROLL_AXIS' undeclared (first use in this function) 455 | axes_labels[VSCROLL_AXIS] = | ^~~~~~~~~~~~ /home/sysbuild/xsrc/external/mit/xf86-input-ws/dist/src/ws.c:490:6: error: 'struct WSDevice' has no member named 'scroll_mask' 490 | priv->scroll_mask = valuator_mask_new(MAX_VALUATORS); .... (if one trivially fixes the previous). > > .... > > > 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 -- ----