GNU bug report logs - #69915
30.0.50; mouse-autoselect-window has no effect in terminal

Previous Next

Package: emacs;

Reported by: Olaf Rogalsky <olaf.rogalsky <at> t-online.de>

Date: Wed, 20 Mar 2024 14:56:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 69915 <at> debbugs.gnu.org (full text, mbox):

From: Jared Finder <jared <at> finder.org>
To: Olaf Rogalsky <olaf.rogalsky <at> t-online.de>
Cc: 69915 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#69915: 30.0.50; mouse-autoselect-window has no effect in
 terminal
Date: Thu, 21 Mar 2024 10:00:51 -0700
On 2024-03-20 11:10, Olaf Rogalsky wrote:
>> On an MS-Windows terminal I don't see this problem, so maybe there's
>> more here than meets the eye?
> Yes, same in X11. I wasn't able to track it down. Maybe it is burried
> deep inside of "read_char".

I tried this change locally on master without the change to window.el 
and everything worked fine for me. Are you certain you need the change 
to window.el as well? I'd be very surprised if it is necessary to change 
the structure of the <select-window> event to get autoselect to work.

My repro was just:

src/emacs -nw -Q
M-x xterm-mouse-mode
M-x set-variable RET mouse-autoselect-window RET t
C-x 2
C-x 3
Then moving the mouse between the three visible windows.

Is your setup is different somehow?


A few other pieces of feedback (you may find it easier to generate the 
events in xterm-mouse-translate-1 to address):

<select-window> events shouldn't be generated while the mouse is being 
dragged. This probably is reflected in fully by track-mouse, but I'd 
suggest looking at the native code that generates the event to confirm.

If there is a case where two events should be generated (not sure if 
this case exists depending on above), we'd want to return both, but you 
can only return a single key sequence from the translate function. I 
think this case deserves a FIXME note.

Did you try out switching frames? I'm not certain if <select-window> is 
supposed to be generated when the frame is switched.

Please name the new internal state variable with prefix "xt-mouse--".

  -- MJF




This bug report was last modified 1 year and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.