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: Po Lu
Subject: Re: master e37eb7f: Add support for pixel wheel deltas on NS
Date: Sat, 27 Nov 2021 19:44:15 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: emacs-devel@gnu.org
>> Date: Sat, 27 Nov 2021 19:34:19 +0800
>> 
>> >> @var{clicks}, if present, is the number of times in quick succession
>> >> the wheel has been moved.
>> 
>> > By "if present", do you mean it can be absent, or do you mean it can
>> > be nil?  If the latter, then "present" is not the right word.
>> 
>> It can be absent, not nil.  Thanks.
>
> Hmm... now I'm confused.  Isn't this produced by this code in
> keyboard.c:
>
>       if (CONSP (event->arg))
>         return list5 (head, position, make_fixnum (double_click_count),
>                       XCAR (event->arg), Fcons (XCAR (XCDR (event->arg)),
>                                                 XCAR (XCDR (XCDR 
> (event->arg)))));
>
> ?  If so, this always produces a 5-element list, and CLICKS is always
> included.  Right?

Yes, but event->arg might not always be a cons.  On X, it is only a cons
in XInput 2 events that have precise scrolling information.  When
handling legacy events, it is nil.

AFAIU (and this may not be a very accurate understanding), if event->arg
is a cons, it means it might have line scroll information, and has pixel
scroll information.

Otherwise, if it is a number, it has only line information.

Otherwise, if the wheel event is double or triple, `double_click_count'
will be included.

And otherwise, only the event name and position will be included.

Thanks.


reply via email to

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