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: Wed, 17 Nov 2021 08:34:43 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Robert Pluim <rpluim@gmail.com> writes:

> Is there really a need for this to be a plist with :delta-x and
> :delta-y in it? Just a cons of x and y would work.

Yes, what if other window systems decide to expose different values to
Lisp code?  Such as for example, the phase of the scroll.

> I donʼt think this is quite right. The 'X' is missing, and itʼs 'X'
> and 'Y' that give the number of pixels. And :delta-x and :delta-y
> (lowercase).

Thanks, I fixed that on my side.

> So the :delta-y value is always 0 when :delta-x is non-zero and vice
> versa? Why bother to return both then? (and why floats and not ints?).

Because other systems (such as GDK) have different methods of reporting
scroll deltas.  While it makes sense in the context of the XInput 2 code
to report them one at a time, it does not in the context of GDK, as it
reports both deltas to Emacs at the same time.

Which means the pure GTK port will report both delta-y and delta-x at
the same time.

Thanks.




reply via email to

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