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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Olaf Rogalsky <olaf.rogalsky <at> t-online.de>, Jared Finder <jared <at> finder.org>
Cc: 69915 <at> debbugs.gnu.org
Subject: bug#69915: 30.0.50; mouse-autoselect-window has no effect in terminal
Date: Wed, 20 Mar 2024 18:43:11 +0200
> From: Olaf Rogalsky <olaf.rogalsky <at> t-online.de>
> Date: Wed, 20 Mar 2024 15:29:33 +0100
> 
> when using emacs in the terminal, the mouse-autoselect-window variable
> has no effect, i.e. moving the mouse from one window to the next does
> not change the selected window.
> 
> Recipe:
> --- snip ---
> emacs -nw
> M-: (xterm-mouse-mode 1)
> M-: (setq mouse-autoselect-window t)
> C-x 2
> <mouse-motion <<<other window>>> >
> --- snap ---
> 
> The reason is, that xt-mouse.el does not generate <select-window>
> events. The following patch fixes that.

Thanks.

> To this end, it also fixes a bug in "window.el". Here, the
> <select-window> event which is added to `last-input-event', does not
> contain a propper posn field. In X11, this works fine, but in the
> terminal it results in a "nil <select-window> is undefined" error.

On an MS-Windows terminal I don't see this problem, so maybe there's
more here than meets the eye?

Anyway, why do you call posn-at-point with first argument nil?  I
don't think the position of point in that window is at all relevant,
is it?  Should we perhaps use the position derived from mouse-position
instead?

Jared, any comments to this patch?




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.