Subject: Re: bug#53353: 29.0.50; spurious <tab-bar> <mouse-movement> events generated by mouse motion in tab-bar

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Jan 2022 13:37:36 +0200

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 19 Jan 2022 17:31:07 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > The usual protocol is that Lisp programs that enable mouse tracking
> > are those that bind mouse-movement events to 'ignore' as they see
> > fit.  If that is what you propose, then it follows that LSP should do
> > that if it doesn't want to support mouse-movement on the tab bar.
> 
> bindings.el binds mouse-movement events to `ignore'

That's only for the text area, not for the other elements of the Emacs
display.

> so I think the same should be done with the tab bar (and tool bar)
> mouse-movement events.

And scroll bar, and mode-line, and header-line, and tab-line,
etc. etc.  Where does all this end?

The global binding of mouse-movement in bindings.el is very old, and I
have no idea what were the reasons for it.  But we don't do anything
like that for any other mouse-movement gesture, so I don't think I
agree we should do it now.  If LSP doesn't want these events, it
should bind them to 'ignore' inside the track-mouse forms.