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

From: Po Lu <[email-masked]>
Date: Wed, 17 Nov 2021 08:34:43 +0800

Robert Pluim <[email-masked]> 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.