Subject: bug#76384: Incorrect mouse events / tool-bar event is undefined error.

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Feb 2025 13:49:49 +0200

> Date: Mon, 17 Feb 2025 22:59:42 +0200
> From: mjk <[email-masked]>
> 
> I had irritating mouse problems originally in lsp/dap mode.
> The mouse caused many-many beeps due to mouse move errors.
> 
> This is probably combination of problems in the basic thing and the lsp
> gui packages together.
> 
> I was able to pinpoint one factor of this problem into configuration
> where I had removed my .emacs and .emacs.d, so that I was in a pretty clean
> configuration.
> 
> In this state I get spurious errors like:
> 
> <tool-bar> <wheel-up> is undefined
> <tool-bar> <wheel-down> is undefined
> <tool-bar> <double-wheel-down> is undefined
> 
> when I rotate the mouse wheel in the window area (pretty much any, like
> *scratch*). Note, in the text window, not in the tool bar.

This is very strange.  Does it only happen in LSP/DAP mode?  If so,
the reason is probably in those packages.  But if this happens also in
"emacs -Q", if you just turn the mouse wheel in that upper part of the
window, below the tool bar, and see these messages, then we'd need to
look at the mouse coordinates as reported to Emacs in your case.  It
would help if you tell what is the Emacs version where you see it and
on what platform.  (For best results, post the data about the Emacs
build where it happens which is collected by "M-x report-emacs-bug".)

Thanks.