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

From: Stefan Monnier <[email-masked]>
Date: Thu, 25 Jan 2024 08:47:17 -0500

Po Lu [2024-01-25 10:25:53] wrote:
> 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.

I'm not suggesting to get rid of those vars.  I'm suggesting to use
those vars in the C code when generating the event.

        Stefan