bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Monnier
Subject: bug#68796: xterm.c: Convert mouse-4/5/6/7 to wheel-up/down/left/right
Date: Sat, 10 Feb 2024 09:22:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Po Lu [2024-02-10 17:09:14] wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>> Ping!  Can we make some progress here?
> I converted most of the Lisp code at my organization (where X servers
> are configured with the input extension disabled) to use wheel events
> under Emacs 30 and arranged for a modified version of Stefan's patch to
> be built.  Which was incidentally not straightforward to do cleanly, as
> the code in question assumed that events it received would be pairs of
> button press and release events, and was very much designed around that
> assumption.

Fascinating.  Is there any way I could get to peek at that code?
Also interested in the backstory about why your X11 servers are configured
without XInput2.

Maybe we should provide a better "reverse" story: with the current patch
users can recover their old `mouse-4/5/6/7` events by setting
`mouse-wheel-*-event` to nil, but then they lose mwheel-based scrolling
(plus a few other bindings, mostly one in completion-preview and one in
flymake), so the etc/NEWS entry should describe how to recover that
scrolling behavior.

Or maybe we should keep `mouse-wheel-*-event` untouched (tho, maybe mark
them obsolete) and instead introduce a new set of variables that control
the remapping of `mouse-4/5/6/7` to `wheel-*` events.

That would provide a smoother transition: users can set those new vars
to nil to recover the old behavior.

Another benefit is that the new var(s) could hold just the button
numbers (i.e. an integer) instead of a symbol, which should simplify the
remapping code (both in the `xterm.c` and the `xt-mouse.el` cases).


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]