Subject: Re: bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect

From: Alan Third <[email-masked]>
Date: Wed, 20 Oct 2021 21:26:49 +0100

On Wed, Oct 20, 2021 at 10:08:05AM +0800, Po Lu wrote:
> Van L <[email-masked]> writes:
> 
> >    Non-nil means autoselect window with mouse pointer. Hide
> >    If nil, do not autoselect windows.
> >    A positive number means delay autoselection by that many seconds: a
> >    window is autoselected only after the mouse has remained in that
> >    window for the duration of the delay.
> >    A negative number has a similar effect, but causes windows to be
> >    autoselected only after the mouse has stopped moving.  (Because of
> >    the way Emacs compares mouse events, you will occasionally wait twice
> >    that time before the window gets selected.)
> >    Any other value means to autoselect window instantaneously when the
> >    mouse pointer enters it.
> >    
> >    Autoselection selects the minibuffer only if it is active, and never
> >    unselects the minibuffer if it is active.
> >    
> >    When customizing this variable make sure that the actual value of
> >    ‘focus-follows-mouse’ matches the behavior of your window manager.
> 
> After reading through the entire thread, I still don't understand what
> the problem is.  But if it's that `mouse-autoselect-window' is not
> respected on the NS port, then I think this bug is now outdated, because
> the code to do that is already present and works.
> 
> (On GNUstep, at least.  I don't know about macOS)
> 
> Alan, do you know anything about this?

The OP expected changing the setting in Emacs to change how the WM in
macOS works, which it doesn't. Since you can't choose another WM in
macOS and the standard one doesn't support focus-follows-mouse there's
not much to do here.
-- 
Alan Third