Subject: bug#68796: xterm.c: Convert mouse-4/5/6/7 to wheel-up/down/left/right

From: Po Lu <[email-masked]>
Date: Tue, 30 Jan 2024 11:53:58 +0800

Stefan Monnier <[email-masked]> writes:

> Hmm... so IIUC you're saying that even when `dpyinfo->supports_xi2` is
> true, we may receive `mouse-4/5/6/7` events for wheel motions?
> Yuck!

Yes, and as always other clients may send whatever they want, although
Emacs is not obliged to handle those events correctly.

>> The correct test of event type is whether x_construct_mouse_click is
>> being called from the XI_ButtonPress or XI_ButtonRelease label in
>> handle_one_xevent.
>
> OK, that sounds fixable.  See additional patch below.

Thanks.  I'm short on time at the moment, but will get around to this.