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: Olaf Rogalsky
Subject: bug#69915: 30.0.50; mouse-autoselect-window has no effect in terminal
Date: Wed, 20 Mar 2024 19:10:53 +0100
User-agent: mu4e 1.9.11; emacs 30.0.50

> 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@gnu.org> writes:

>> 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?


-- 
Olaf Rogalsky
Schwoerhausgasse 5
89073 Ulm
Germany





reply via email to

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