bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69915: 30.0.50; mouse-autoselect-window has no effect in terminal


From: Eli Zaretskii
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@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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]