GNU bug report logs -
#69915
30.0.50; mouse-autoselect-window has no effect in terminal
Previous Next
Full log
View this message in rfc822 format
> 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".
> Anyway, why do you call posn-at-point with first argument nil? I
Because I was lazy and didn't thought, that "the position of point in that
window is at all relevant".
Eli Zaretskii <eliz <at> gnu.org> writes:
>> 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?
--
Olaf Rogalsky
Schwoerhausgasse 5
89073 Ulm
Germany
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.