emacs-devel
[Top][All Lists]
Advanced

[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: Sat, 27 Nov 2021 12:47:40 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: rpluim@gmail.com,  emacs-devel@gnu.org
> Date: Sat, 27 Nov 2021 15:14:13 +0800
> 
> >> On a reasonably sized frame that would be 1 to 2 pixels.
> 
> > Is this with a mouse wheel or with a touchpad?  I was asking about the
> > mouse wheel.
> 
> This is with a mouse wheel that supports pixel values, i.e., a mouse
> wheel that has no fixed "steps".  (A mouse wheel with fixed steps would
> however report a value of 1.0: every XInput 2 program I tried will
> scroll the close-to-100 pixels that implies on each turn of such a
> wheel.)

OK, thanks.

Btw, I'm confused by the documentation of the enhanced mouse-wheel
events.  The manual says

  @item (wheel-up @var{position})
  @itemx (wheel-down @var{position})
  [...]
                         The event may have additional arguments after
  @var{position}.  The third argument after @var{position}, if present,
  is a pair of the form @w{@code{(@var{x} . @var{y})}}, where @var{x}
  and @var{y} are the number of pixels to scroll by in each axis.

It mentions the 3rd argument (starting from 1, I presume, given the
format of the event shown in @item).  But the code in pixel-scroll.el
does:

        (let ((delta (round (cdr (nth 4 event)))))

So it takes the 4th element (zero-based), which is a 2-element
discrepancy.  What is the real form of the enhanced wheel events, and
what are the 5 elements in them?  Or what am I missing here?



reply via email to

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