unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
@ 2018-06-26  7:13 Van L
  2018-06-26 14:40 ` Eli Zaretskii
  2021-10-20  2:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 16+ messages in thread
From: Van L @ 2018-06-26  7:13 UTC (permalink / raw)
  To: 31975

Hello,

The customized setting for point-to-focus 
has no effect.

Maybe a tweak for Emacs is all you 
need to point-to-focus as discussed 
at stackoverflow.

#+NAME: point-to-focus
#+BEGIN_EXAMPLE
  https://stackoverflow.com/questions/98310/focus-follows-mouse-plus-auto-raise-on-mac-os-x
    defaults write com.apple.Terminal FocusFollowsMouse -bool true
#+END_EXAMPLE

#+NAME: `M-x customize` Mouse Autoselect Window
#+BEGIN_EXAMPLE
   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.

#+END_EXAMPLE








^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-26  7:13 bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect Van L
@ 2018-06-26 14:40 ` Eli Zaretskii
  2018-06-26 15:26   ` Van L
  2021-10-20  2:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2018-06-26 14:40 UTC (permalink / raw)
  To: Van L; +Cc: 31975

> From: Van L <van@scratch.space>
> Date: Tue, 26 Jun 2018 17:13:40 +1000
> 
> The customized setting for point-to-focus 
> has no effect.

On macOS?  Or in general?  (And why doesn't this report include all
the details collected by "M-x report-emacs-bug"?)

> Maybe a tweak for Emacs is all you 
> need to point-to-focus as discussed 
> at stackoverflow.
> 
> #+NAME: point-to-focus
> #+BEGIN_EXAMPLE
>   https://stackoverflow.com/questions/98310/focus-follows-mouse-plus-auto-raise-on-mac-os-x
>     defaults write com.apple.Terminal FocusFollowsMouse -bool true
> #+END_EXAMPLE

AFAIU, this is outside of Emacs, right?

> #+NAME: `M-x customize` Mouse Autoselect Window
> #+BEGIN_EXAMPLE
>    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.
> 
> #+END_EXAMPLE

And how is this part relevant?

Thanks.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-26 14:40 ` Eli Zaretskii
@ 2018-06-26 15:26   ` Van L
  2018-06-26 15:54     ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Van L @ 2018-06-26 15:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 31975


> On macOS?

Emacs 26.1 NS port is on Apple Mac OS.

> this is outside of Emacs, right?

There is the chance of the following call to work, no?

  `defaults write org.gnu.Emacs FocusFollowsMouse -bool true`

If not, why not one day in the far off distant future.

From what I can tell "M-x report-emacs-bug” needs 
email set in Emacs and a look at Gnus involves putting 
cleartext password on a one line setting

> 
>> #+NAME: `M-x customize` Mouse Autoselect Window
>> #+BEGIN_EXAMPLE
>>   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.
>> 
>> #+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.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-26 15:26   ` Van L
@ 2018-06-26 15:54     ` Eli Zaretskii
  2018-06-27  4:49       ` Van L
  2018-06-27  7:34       ` martin rudalics
  0 siblings, 2 replies; 16+ messages in thread
From: Eli Zaretskii @ 2018-06-26 15:54 UTC (permalink / raw)
  To: Van L; +Cc: 31975

> From: Van L <van@scratch.space>
> Date: Wed, 27 Jun 2018 01:26:45 +1000
> Cc: 31975@debbugs.gnu.org
> 
> > this is outside of Emacs, right?
> 
> There is the chance of the following call to work, no?
> 
>   `defaults write org.gnu.Emacs FocusFollowsMouse -bool true`
> 
> If not, why not one day in the far off distant future.

Sorry, I cannot parse that.  Too dense today, I guess.

> From what I can tell "M-x report-emacs-bug” needs 
> email set in Emacs and a look at Gnus involves putting 
> cleartext password on a one line setting

No, it doesn't.  One of the options offered when you are about to send
is to use your system's mailclient.

> >> #+NAME: `M-x customize` Mouse Autoselect Window
> >> #+BEGIN_EXAMPLE
> >>   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.
> >> 
> >> #+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.

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.

Thanks.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-26 15:54     ` Eli Zaretskii
@ 2018-06-27  4:49       ` Van L
  2018-06-27 14:50         ` Eli Zaretskii
  2018-06-27  7:34       ` martin rudalics
  1 sibling, 1 reply; 16+ messages in thread
From: Van L @ 2018-06-27  4:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 31975


> Sorry, I cannot parse that.

In other words, to demonstrate to you, 
how the desired and expected behavior 
is configured, for example, for the
Terminal app, I found and quoted what
was needed to tell the window manager
what to do.

Also, not for use with the NS port,
but x11 to a remote GNU Linux GNU Emacs,
XQuartz’s X11 Preferences has a tick box
for `Focus Follows Mouse`.

I am asking for this behavior for the mouse
on the NS port’s outer most windowing framing
boxes with the horizontal traffic lights at
the upper most left most corner. In use, I half full screen
zoom two of those, arranged left and right, in the window manager.

The mouse focus doesn’t follow Emacs’s frame arranged left and right.
`C-x o` does not skip among Emacs’s frame.

The mouse focus does follow within the Emacs’s frame on the right, 
for example, when it is split horizontally to contain a top and bottom elements.
`C-x o` does skip among top and bottom elements.

> you should set mouse-autoselect-window to t, move the mouse
> between windows, then show the output of "C-h l”.  

`mouse-autoselect-window` is t; for the following

#+BEGIN_EXAMPLE
   [next-line]
   <down> [next-line]
   <down> [next-line]
   <next> [scroll-up-command]
   <next> [scroll-up-command]
   <prior> [scroll-down-command]
   <prior> [scroll-down-command]
   <help-echo> <select-window> [handle-select-window]
   <help-echo> <help-echo> <switch-frame> [handle-switch-frame]
   <switch-frame> [handle-switch-frame]
   C-h v [describe-variable]
   m [self-insert-command]
   o [self-insert-command]
   u [self-insert-command]
   s [self-insert-command]
   e [self-insert-command]
   <tab> [minibuffer-complete]
   a [self-insert-command]
   u [self-insert-command]
   t [self-insert-command]
   <tab> [minibuffer-complete]
   <return> [minibuffer-complete-and-exit]
   C-h l [view-lossage]
   <select-window> [handle-select-window]
   <select-window> [handle-select-window]
   <help-echo> <select-window> [handle-select-window]
   <select-window> [handle-select-window]
   <help-echo> <select-window> [handle-select-window]
   <select-window> [handle-select-window]
   <select-window> [handle-select-window]
   <select-window> [handle-select-window]
   <help-echo> <select-window> [handle-select-window]
   <select-window> [handle-select-window]
   <help-echo> <select-window> [handle-select-window]
   <select-window> [handle-select-window]
   <help-echo> <select-window> [handle-select-window]
   C-h l [view-lossage]

  [back]

#+END_EXAMPLE

Repetition of lines more than two were removed.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-26 15:54     ` Eli Zaretskii
  2018-06-27  4:49       ` Van L
@ 2018-06-27  7:34       ` martin rudalics
  2018-06-27 14:56         ` Eli Zaretskii
  1 sibling, 1 reply; 16+ messages in thread
From: martin rudalics @ 2018-06-27  7:34 UTC (permalink / raw)
  To: Eli Zaretskii, Van L; +Cc: 31975

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






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-27  4:49       ` Van L
@ 2018-06-27 14:50         ` Eli Zaretskii
  2018-06-28  6:03           ` Van L
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2018-06-27 14:50 UTC (permalink / raw)
  To: Van L; +Cc: 31975

> From: Van L <van@scratch.space>
> Date: Wed, 27 Jun 2018 14:49:16 +1000
> Cc: 31975@debbugs.gnu.org
> 
> In other words, to demonstrate to you, 
> how the desired and expected behavior 
> is configured, for example, for the
> Terminal app, I found and quoted what
> was needed to tell the window manager
> what to do.

OK, but I don't think it helps us solve this problem, except by
telling that it should be possible, at least in principle.

> Also, not for use with the NS port,
> but x11 to a remote GNU Linux GNU Emacs,
> XQuartz’s X11 Preferences has a tick box
> for `Focus Follows Mouse`.

I believe this is for the remote X, so gain not useful for the problem
you have locally.

> I am asking for this behavior for the mouse
> on the NS port’s outer most windowing framing
> boxes with the horizontal traffic lights at
> the upper most left most corner. In use, I half full screen
> zoom two of those, arranged left and right, in the window manager.

Not sure I understand: are these 2 Emacs frames, or are these something
else?

> The mouse focus doesn’t follow Emacs’s frame arranged left and right.
> `C-x o` does not skip among Emacs’s frame.

Again, I'm not following: "C-x o" is not supposed to switch between
frames, it switches between windows on the same frame (as I'm sure you
know).

> The mouse focus does follow within the Emacs’s frame on the right, 
> for example, when it is split horizontally to contain a top and bottom elements.
> `C-x o` does skip among top and bottom elements.

So mouse-autoselect-window does work between windows of the same
frame, but doesn't work when you go to a window on another frame?  If
so, this is indeed a problem to solve with your window-manager, not
with Emacs: you need to configure your window-manager so that it makes
focus follow the mouse.  Emacs cannot do that; its focus-follows-mouse
variable is the means to tell Emacs, if necessary, that you have
configured the window-manager that way, but setting that variable
cannot force the window-manager to work that way.

> `mouse-autoselect-window` is t; for the following
> 
> #+BEGIN_EXAMPLE
>    [next-line]
>    <down> [next-line]
>    <down> [next-line]
>    <next> [scroll-up-command]
>    <next> [scroll-up-command]
>    <prior> [scroll-down-command]
>    <prior> [scroll-down-command]
>    <help-echo> <select-window> [handle-select-window]
>    <help-echo> <help-echo> <switch-frame> [handle-switch-frame]
>    <switch-frame> [handle-switch-frame]
>    C-h v [describe-variable]
>    m [self-insert-command]
>    o [self-insert-command]
>    u [self-insert-command]
>    s [self-insert-command]
>    e [self-insert-command]
>    <tab> [minibuffer-complete]
>    a [self-insert-command]
>    u [self-insert-command]
>    t [self-insert-command]
>    <tab> [minibuffer-complete]
>    <return> [minibuffer-complete-and-exit]
>    C-h l [view-lossage]
>    <select-window> [handle-select-window]
>    <select-window> [handle-select-window]
>    <help-echo> <select-window> [handle-select-window]
>    <select-window> [handle-select-window]
>    <help-echo> <select-window> [handle-select-window]
>    <select-window> [handle-select-window]
>    <select-window> [handle-select-window]
>    <select-window> [handle-select-window]
>    <help-echo> <select-window> [handle-select-window]
>    <select-window> [handle-select-window]
>    <help-echo> <select-window> [handle-select-window]
>    <select-window> [handle-select-window]
>    <help-echo> <select-window> [handle-select-window]
>    C-h l [view-lossage]

I do see select-window here, so the feature is working.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-27  7:34       ` martin rudalics
@ 2018-06-27 14:56         ` Eli Zaretskii
  2018-06-28 10:40           ` Van L
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2018-06-27 14:56 UTC (permalink / raw)
  To: martin rudalics; +Cc: van, 31975

> Date: Wed, 27 Jun 2018 09:34:28 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: 31975@debbugs.gnu.org
> 
>  > 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.

LGTM, thanks.

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

It sounds like the window-manager is not configured to have focus
follow mouse.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-27 14:50         ` Eli Zaretskii
@ 2018-06-28  6:03           ` Van L
  0 siblings, 0 replies; 16+ messages in thread
From: Van L @ 2018-06-28  6:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 31975


>> Terminal app, I found and quoted what
>> was needed to tell the window manager
>> what to do.
> 
> I don't think it helps us solve this problem
> 
> I believe this is for the remote X

I believe the cases of Terminal app, XQuartz 
prove it is possible.

> are these 2 Emacs frames

Yes, based on the UI experience on NS port creating a `new frame`
which is selectable from the Emacs’s Icon’s context menu emanating 
from the Dock.


> I'm not following: "C-x o" is not supposed to switch between
> frames

I included that as a test case to make distinct what is the 
frame and window according to terms you use.

> So mouse-autoselect-window does work between windows of the same
> frame, but doesn't work when you go to a window on another frame?  If
> so, this is indeed a problem to solve with your window-manager, not
> with Emacs

I believe Emacs can model how it should interact with this particular
window manager based on how Terminal app, XQuartz does it right.

> I do see select-window here, so the feature is working.

The select is working between boxes (windows) within an outer most box (frame).

The ask is for the mouse focus to follow select on the outer most boxes (frames).

I haven’t built Emacs 27 on Mac OS and will see what has been suggested by 
OC’s nsterm.c’s mouseMoved.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-27 14:56         ` Eli Zaretskii
@ 2018-06-28 10:40           ` Van L
  2018-06-28 12:59             ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Van L @ 2018-06-28 10:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 31975


> It sounds like the window-manager is not configured to have focus
> follow mouse.

I believe I was after `mouse-autoselect-frame` now 
that I know the relationship of frame to windows within it.

The window-manager’s default is for click to focus, but two apps
are known to be customizeable to `focus-follow-mouse` for frames
belonging to the app.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-28 10:40           ` Van L
@ 2018-06-28 12:59             ` Eli Zaretskii
  2018-06-28 13:05               ` Van L
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2018-06-28 12:59 UTC (permalink / raw)
  To: Van L; +Cc: 31975

> From: Van L <van@scratch.space>
> Date: Thu, 28 Jun 2018 20:40:03 +1000
> Cc: martin rudalics <rudalics@gmx.at>,
>  31975@debbugs.gnu.org
> 
> I believe I was after `mouse-autoselect-frame` now 
> that I know the relationship of frame to windows within it.

You mean, hypothetically?  Because I don't think such a feature exists
in Emacs as of now.

> The window-manager’s default is for click to focus, but two apps
> are known to be customizeable to `focus-follow-mouse` for frames
> belonging to the app.

Can't you change the window-manager's default?





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-28 12:59             ` Eli Zaretskii
@ 2018-06-28 13:05               ` Van L
  2018-06-28 18:24                 ` Alan Third
  0 siblings, 1 reply; 16+ messages in thread
From: Van L @ 2018-06-28 13:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 31975


> You mean, hypothetically?  

It might be trivial for the NS/Mac port developers
familiar with plumbing conventions for apps on the 
platform.

> Can't you change the window-manager's default?

The wm allows and honors apps wanting that behavior.
I guess the nsterm or macterm source files for
interacting with frames and focus need a little
kick.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-28 13:05               ` Van L
@ 2018-06-28 18:24                 ` Alan Third
  0 siblings, 0 replies; 16+ messages in thread
From: Alan Third @ 2018-06-28 18:24 UTC (permalink / raw)
  To: Van L; +Cc: 31975

On Thu, Jun 28, 2018 at 11:05:26PM +1000, Van L wrote:
> 
> > You mean, hypothetically?  
> 
> It might be trivial for the NS/Mac port developers
> familiar with plumbing conventions for apps on the 
> platform.
> 
> > Can't you change the window-manager's default?
> 
> The wm allows and honors apps wanting that behavior.
> I guess the nsterm or macterm source files for
> interacting with frames and focus need a little
> kick.

It shouldn’t be hard, although I’d mark this as wishlist for now as
I’m working on other things.

If someone else fancies giving it a go I think the simplest approach
is to modify [EmacsEvent mouseEntered:] to make the window key if some
variable is set.
-- 
Alan Third





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2018-06-26  7:13 bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect Van L
  2018-06-26 14:40 ` Eli Zaretskii
@ 2021-10-20  2:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-20 20:26   ` Alan Third
  1 sibling, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-20  2:08 UTC (permalink / raw)
  To: Van L; +Cc: alan, 31975

Van L <van@scratch.space> 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?





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2021-10-20  2:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-20 20:26   ` Alan Third
  2021-10-21  3:13     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 16+ messages in thread
From: Alan Third @ 2021-10-20 20:26 UTC (permalink / raw)
  To: Po Lu; +Cc: Van L, 31975

On Wed, Oct 20, 2021 at 10:08:05AM +0800, Po Lu wrote:
> Van L <van@scratch.space> 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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect
  2021-10-20 20:26   ` Alan Third
@ 2021-10-21  3:13     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 16+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-21  3:13 UTC (permalink / raw)
  To: Alan Third; +Cc: Po Lu, Van L, 31975

Alan Third <alan@idiocy.org> writes:

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

OK; I'm closing this bug report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-10-21  3:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-26  7:13 bug#31975: Emacs NS port `M-x customize` Mouse Autoselect Window (point-to-focus) has no effect Van L
2018-06-26 14:40 ` Eli Zaretskii
2018-06-26 15:26   ` Van L
2018-06-26 15:54     ` Eli Zaretskii
2018-06-27  4:49       ` Van L
2018-06-27 14:50         ` Eli Zaretskii
2018-06-28  6:03           ` Van L
2018-06-27  7:34       ` martin rudalics
2018-06-27 14:56         ` Eli Zaretskii
2018-06-28 10:40           ` Van L
2018-06-28 12:59             ` Eli Zaretskii
2018-06-28 13:05               ` Van L
2018-06-28 18:24                 ` Alan Third
2021-10-20  2:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-20 20:26   ` Alan Third
2021-10-21  3:13     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).