unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3397: NS: modeline shows inactive frame after make-frame
@ 2009-05-27  1:42 David Reitter
  0 siblings, 0 replies; 4+ messages in thread
From: David Reitter @ 2009-05-27  1:42 UTC (permalink / raw)
  To: emacs-pretest-bug

When after-make-frame-functions is set to nil (which is should be by  
default),
after a (make-frame), the new frame is selected but the mode-line in  
its window shows it as unselected, even though it is selected.


after-make-frame-functions defaults to (select-frame) [ns-win.el] in  
order to work around this bug.





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

* bug#3397: NS: modeline shows inactive frame after make-frame
@ 2009-07-23 16:34 Adrian Robert
  2016-05-17 17:58 ` Alan Third
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Robert @ 2009-07-23 16:34 UTC (permalink / raw)
  To: 3397

The docs for make-frame say:

> This function itself does not make the new frame the selected frame.
> The previously selected frame remains selected.  However, the
> window system may select the new frame for its own reasons, for
> instance if the frame appears under the mouse pointer and your
> setup is for focus to follow the pointer.

How does this work under X with click-to-focus?  Or W32?

If these just leave the frame unselected, perhaps we should too,  
though it seems disturbing to users.






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

* bug#3397: NS: modeline shows inactive frame after make-frame
  2009-07-23 16:34 bug#3397: NS: modeline shows inactive frame after make-frame Adrian Robert
@ 2016-05-17 17:58 ` Alan Third
  2021-08-26 18:40   ` Alan Third
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Third @ 2016-05-17 17:58 UTC (permalink / raw)
  To: Adrian Robert; +Cc: 3397

Adrian Robert <adrian.b.robert@gmail.com> writes:

> The docs for make-frame say:
>
>> This function itself does not make the new frame the selected frame.
>> The previously selected frame remains selected.  However, the
>> window system may select the new frame for its own reasons, for
>> instance if the frame appears under the mouse pointer and your
>> setup is for focus to follow the pointer.
>
> How does this work under X with click-to-focus?  Or W32?
>
> If these just leave the frame unselected, perhaps we should too,
> though it seems disturbing to users.

I just checked a GTK+ build and it selects the frame even when
after-make-frame-functions is set to nil, so I'd guess that the NS build
should probably do so too.

-- 
Alan Third





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

* bug#3397: NS: modeline shows inactive frame after make-frame
  2016-05-17 17:58 ` Alan Third
@ 2021-08-26 18:40   ` Alan Third
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Third @ 2021-08-26 18:40 UTC (permalink / raw)
  To: Adrian Robert; +Cc: 3397

Alan Third <alan@idiocy.org> writes:

> Adrian Robert <adrian.b.robert@gmail.com> writes:
>
>> The docs for make-frame say:
>>
>>> This function itself does not make the new frame the selected frame.
>>> The previously selected frame remains selected.  However, the
>>> window system may select the new frame for its own reasons, for
>>> instance if the frame appears under the mouse pointer and your
>>> setup is for focus to follow the pointer.
>>
>> How does this work under X with click-to-focus?  Or W32?
>>
>> If these just leave the frame unselected, perhaps we should too,
>> though it seems disturbing to users.
>
> I just checked a GTK+ build and it selects the frame even when
> after-make-frame-functions is set to nil, so I'd guess that the NS build
> should probably do so too.

I've just realised this is the same problem as bug#47731.

Basically the NS port only creates emacs events within the NS run loop.
Emacs lisp runs outside the NS run loop, so when some GUI action is
called from lisp, by the time it gets down to windowDidBecomeKey or
whatever it checks whether it can create an event and the answer is no,
so it doesn't bother.

In this case that means it doesn't create the FOCUS_IN_EVENT for Emacs
and so Emacs doesn't set focus on the new frame.

I've no idea why this limitation is in place.
-- 
Alan Third





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

end of thread, other threads:[~2021-08-26 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-23 16:34 bug#3397: NS: modeline shows inactive frame after make-frame Adrian Robert
2016-05-17 17:58 ` Alan Third
2021-08-26 18:40   ` Alan Third
  -- strict thread matches above, loose matches on Subject: below --
2009-05-27  1:42 David Reitter

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