Subject: bug#68698: 30.0.50; Making xt-mouse emit `wheel-up/down`

From: Po Lu <[email-masked]>
Date: Thu, 25 Jan 2024 10:25:53 +0800

Stefan Monnier <[email-masked]> writes:

> The second step would be to do something similar for the non-XInput2 X11
> build: make it generate `wheel-up/down` events according to
> `mouse-wheel-down/up-event` settings.  Then packages like
> `completion-preview` and `mwheel` won't need to pay attention to the
> (confusingly named) `mouse-wheel-down/up-event` vars any more.

No!

Button4, 5, 6 and 7 are only mouse wheels in one particular group of X
servers.  It is impossible to detect whether they are mouse wheels
without the input extension (and this is why XI display connections
produce wheel events), so such an escape hatch as mouse-wheel-*-event
_must_ be provided for X servers where the general assumption that they
are mouse wheels does not hold true.