Jared Finder <jared@finder.org> writes:
Pixel scroll does not work on many platforms, such as Windows and Mac
as
they only expose device classes core-keyboard and core-pointer.
Additionally, I have found that for Wayland under WSL on the emacs-29
branch, both the touchpad and the mouse are reported with device-class
'mouse on my Thinkpad laptop.
Incidentally we don't support WSL, as circumventing their bugs for a
proprietary platform which Emacs already supports through the Cygwin
and
native Windows builds is an unjustified burden.
The attached patch enables a user to specify arbitrary device classes
that should cause interpolated scrolling so they can fix any issues.
This enables a user to customize this to the behavior of their local
machine.
I am undecided if this should involve renaming the existing
pixel-scroll-precision-interpolate-mice option or if it is important
to
stay backward compatible with customizations that changed that option
from its default, t, to some other non-nil value. Please give
feedback
here.
Otherwise, this is a straightforward change that I think would be good
for the Emacs 29 branch so all platforms can get the smoothness of
interpolated pixel scrolling.
pixel-scroll-precision-mode is first and foremost designed for devices
such as touchpads, for which interpolation is unnecessary as detailed
scrolling deltas are always reported within events they generate.
Interpolation for wheel mice is an afterthought, so to speak, and if
the
code responsible for interfacing with the window system cannot detect
wheel mice by itself, then the option
pixel-scroll-precision-large-scroll-height might be set to a value
suitable for wheel mice to be distinguished from touchpads and for
interpolation to be applied to them.
When a predicated fallback mechanism is already in place, there's no
need for one that's far more coarse. Furthermore, p-s-p-l-s-h can be
set to 0, which would be identical to setting this variable to t.
Thanks, but this isn't necessary. Closing.