Subject: bug#57476: 29.0.50; Mouse wheel event ignored on Lucid build

From: Po Lu <[email-masked]>
Date: Tue, 30 Aug 2022 09:29:34 +0800

Po Lu <[email-masked]> writes:

> Input extension builds do not normally report mouse-1 or mouse-3; that
> only happens if the input extension could not be set up for some reason.

Please ignore that, I wasn't really thinking when I wrote this.

Unfortunately, I cannot reproduce the bug on any build of Emacs.  Please
instrument the following code around line 21053 of xterm.c as follows:

		      /* See the comment on top of x_cache_xi_devices
			 for more details on how scroll wheel movement
			 is reported on XInput 2.  */
		      delta = x_get_scroll_valuator_delta (dpyinfo, device,
							   i, *values, &val);
		      values++;

		      if (!val)
			{
			  other_valuators_found = true;
			  continue;
			}

		      printf ("%g\n", delta); <=== add this instrumentation

		      if (delta != DBL_MAX)
			{

and show what is printed when you try to scroll using the mouse.

Thanks.