Subject: Re: bug#73469: 29.4; mouse passing on terminal window generates events

From: Francesco Potortì <[email-masked]>
Date: Sun, 29 Sep 2024 10:52:40 +0200

>>> I have found the culprit: it is xterm-mouse-mode.
>
>Could you please reshare the lossage, making sure you are moving the 
>mouse around over an otherwise empty buffer and not holding any 
>modifiers or mouse buttons?

Here you are. This is the mouse moving on an empty region of the terminal frame I'm using under Screen, after M-x xterm-mouse-mode, without touching any mouse buttons, wheels or keyboard modifiers:

 3 5 ; C-<mouse-1> 7 0 ; 1 1 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 1 1 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 1 1 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 1 1 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 1 1 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 1 1 M ESC [ M 3 5 ; C-<mouse-1> 6 8 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 6 6 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 6 6 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 6 5 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 6 5 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 6 4 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 6 1 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 9 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 7 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 7 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 6 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 6 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 5 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 5 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 4 ; 1 2 M ESC [ M 3 5 ; C-<mouse-1> 5 4 ; 1 2 M

At this point I press f10 to get rid of the red and blue menu that has popped up:

ESC [ 2 1 ~

ESC x ;; execute-extended-command
 ESC O A ;; previous-line-or-history-element
 RET	 ;; minibuffer-complete-and-exit
 C-h l	 ;; view-lossage

Now I'm doing the same with emacs -Q under a fresh Screen window whose TERM I set to screen.linux:

 7 6 ; 2 6 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 6 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 5 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 2 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 2 5 M ESC [ 2 1 ~ C-h l ;; view-lossage

Same as above (that is, in a Screen window), with TERM set to xterm-256color:

 6 9 ; 1 5 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 1 5 M ESC [ M 3 5 ; C-<mouse-1> 6 9 ; 1 5 M ESC [ M 3 5 ; C-<mouse-1> 7 0 ; 1 6 M ESC [ M 3 5 ; C-<mouse-1> 7 2 ; 1 7 M ESC [ M 3 5 ; C-<mouse-1> 7 3 ; 1 8 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 1 8 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 1 9 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 2 0 M ESC [ M 3 5 ; C-<mouse-1> 7 5 ; 2 3 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 4 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 5 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 6 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 6 M ESC [ M 3 5 ; C-<mouse-1> 7 6 ; 2 7 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 2 7 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 2 7 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 2 7 M ESC [ M 3 5 ; C-<mouse-1> 7 4 ; 2 7 M ESC [ M 3 5 ; C-<mouse-1> 7 3 ; 2 8 M ESC [ M 3 5 ; C-<mouse-1> 7 3 ; 2 8 M ESC [ 2 1 ~ C-h l ;; view-lossage

At the moment, I can't reproduce the problem without Screen, that is, inside a Mate-terminal.  So maybe the problem is with Screen itself.  I have to stop here, too many things to do today, hope to get back to it later