GNU bug report logs - #51891
29.0.50; [PATCH] Pixel delta support for wheel events on X

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Tue, 16 Nov 2021 12:39:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: rpluim <at> gmail.com, 51891 <at> debbugs.gnu.org
Subject: bug#51891: 29.0.50; [PATCH] Pixel delta support for wheel events on X
Date: Wed, 17 Nov 2021 15:33:29 +0200
> Cc: 51891 <at> debbugs.gnu.org
> Date: Wed, 17 Nov 2021 10:38:41 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> --- a/doc/lispref/commands.texi
> +++ b/doc/lispref/commands.texi
> @@ -1985,7 +1985,11 @@ Misc Events
>  These kinds of event are generated by moving a mouse wheel.  The
>  @var{position} element is a mouse position list (@pxref{Click
>  Events}), specifying the position of the mouse cursor when the event
> -occurred.
> +occurred.  The event may have additional arguments after
> +@var{position}.  The third argument after @var{position}, if present,
> +is a property list of the form @w{@code{(:delta-x @var{x} :delta-y
> +@var{y})}}, where @var{x} and @var{y} are the number of pixels to
> +scroll by in each axis.

Did you consider the possibility of defining a new event?

And should mwheel.el be aware of this change somehow?

And finally, why introduce keyword-value pairs into a form that didn't
use them before?  Can we store just the values there?

> +			scroll_unit = pow (FRAME_PIXEL_HEIGHT (f), 2.0 / 3.0);

Ouch! can we avoid calling 'pow' here?  It's an expensive function.

> +  DEFVAR_BOOL ("x-coalesce-scroll-events", x_coalesce_scroll_events,
> +	       doc: /* Non-nil means to only send one wheel event for each scroll unit.
> +Otherwise, a wheel event will be sent every time the mouse wheel is
> +moved.

This is confusing: what does "scroll unit" mean in this context?




This bug report was last modified 3 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.