bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#51891: 29.0.50; [PATCH] Pixel delta support for wheel events on X


From: Po Lu
Subject: bug#51891: 29.0.50; [PATCH] Pixel delta support for wheel events on X
Date: Thu, 18 Nov 2021 17:17:25 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> A Lisp object could have different types, one each for every use case
> we want to support.  For example, we could use a single object there,
> which in your case will be a list of 2 values, and in other cases will
> have more members.  We do this kind of stuff all the time, including
> in specifying POSITION in various events -- there are a gazillion of
> different forms of POSITION already in Emacs.  I see no reason to
> change the format when all we need to do is add one more form of
> POSITION.

That makes sense, I'll modify the change in a bit to report scroll
deltas as a pair of (DELTA-X . DELTA-Y) instead.

> Sorry, I don't understand: XInput2 knows about FRAME_PIXEL_HEIGHT of
> our frames?

Indeed it does.  It's the window server, after all.

>> An amount of scrolling that would previously generate a `mouse-4' or
>> `mouse-5' event.

> That doesn't really answer my question.  Let me ask it differently:
> how does "scroll unit" differ from "every time the wheel is moved"?

Basically, even tiny movements of the scroll wheel will cause XInput 2
to generate wheel events.  This makes the behavior stay like the
original by default, where you have to scroll 96 or so pixels before a
wheel event is actually sent.  (This is generally true, but certain mice
may behave differently.)

> I might have ideas once I understand what you are trying to say ;-)

Thanks, I hope what I just said clears things up a bit.




reply via email to

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