unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Adrian Robert <adrian.b.robert@gmail.com>
Cc: 3397@debbugs.gnu.org
Subject: bug#3397: NS: modeline shows inactive frame after make-frame
Date: Thu, 26 Aug 2021 19:40:05 +0100	[thread overview]
Message-ID: <87sfywf3sq.fsf@idiocy.org> (raw)
In-Reply-To: <m2shxg7ej9.fsf@breton.holly.idiocy.org> (Alan Third's message of "Tue, 17 May 2016 18:58:02 +0100")

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





  reply	other threads:[~2021-08-26 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-05-27  1:42 David Reitter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfywf3sq.fsf@idiocy.org \
    --to=alan@idiocy.org \
    --cc=3397@debbugs.gnu.org \
    --cc=adrian.b.robert@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).