[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master e37eb7f: Add support for pixel wheel deltas on NS

From: Eli Zaretskii
Subject: Re: master e37eb7f: Add support for pixel wheel deltas on NS
Date: Fri, 26 Nov 2021 10:17:44 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: rpluim@gmail.com,  emacs-devel@gnu.org
> Date: Fri, 26 Nov 2021 15:00:40 +0800
> > What is "precision scroll information", and how does it differ from
> > the information we receive from the mouse wheel on MS-Windows today?
> > AFAICT, we already get a window-system message for every movement of
> > the mouse wheel, so what else is needed?
> Basically, we need to expose not only whether or not the mouse wheel has
> been scrolled, but exactly how much it has been scrolled, each time a
> wheel event is sent.
> We expose it to Lisp as the amount of pixels the text should be scrolled
> in each axis, as that is the most common format used by modern window
> systems.

How to compute the amount of pixels for a given amount of wheel delta?
The wheel delta on MS-Windows is reported in abstract units, not
directly related to any pixels, AFAICT.  I don't see the logic of the
conversion to pixels documented anywhere in the X or NS code, and the
comments, such as they are, make no sense at all to someone who knows
nothing about X mouse-wheel handling.  In xterm.c, it seems like some
kind of query of the device "valuators" (whatever that is) is being
used?  And on NS, it seems like the delta is already reported in

So I'm still in the dark here.  (We really need to document our
algorithms better, unless we assume only GUI experts will read and
maintain them.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]