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

From: martin rudalics <[email-masked]>
Date: Wed, 27 Jun 2018 09:34:28 +0200

>>>>    When customizing this variable make sure that the actual value of
 >>>>    ‘focus-follows-mouse’ matches the behavior of your window manager.
 >>>>
 >>>> #+END_EXAMPLE
 >>>
 >>> And how is this part relevant?
 >>
 >> It is the setting that takes no effect
 >> the perceived bug that does not work as
 >> expected and desired, which is the cause
 >> for this bug#31975 report.
 >
 > But the above has no relation to focus-follows-mouse.
 > mouse-autoselect-window works when the Emacs frame already has focus,
 > and it selects one window on that frame by tracking mouse movements
 > above the frame.  (Yes, I know that the last sentence makes it sound
 > like the two features are related, but that is only true on some
 > systems.  E.g., here focus-follows-mouse is nil, the default, whereas
 > the window manager is configured to give focus to the frame where
 > mouse is; and yet mouse-autoselect-window does work.

I tried to clarify the doc-string.  Please have a look.

 > So I think you should set mouse-autoselect-window to t, move the mouse
 > between windows, then show the output of "C-h l".  Then we might have
 > some hint wrt what's going on.

If this doesn't help, the OP could try to debug mouseMoved in
nsterm.c.  It might also help to enable nstrace to find out whether
there are any mouse_autoselect_window related messages and what they
say.

martin