unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Sean Farley <sean@farley.io>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 47731@debbugs.gnu.org
Subject: bug#47731: 28.0.50; Switching frame via keyboard does not fire focus change event
Date: Sun, 29 Aug 2021 10:38:38 +0100	[thread overview]
Message-ID: <YStVns9nBych2Vt+@idiocy.org> (raw)
In-Reply-To: <m2eead9bm6.fsf@farley.io>

On Sat, Aug 28, 2021 at 10:23:35PM -0500, Sean Farley via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
> 
> Alan Third <alan@idiocy.org> writes:
> 
> > On Thu, May 06, 2021 at 11:54:10AM +0200, Lars Ingebrigtsen wrote:
> >> Sean Farley <sean@farley.io> writes:
> >>
> >> > Here is some testing code:
> >> > (defun test--focus-out ()
> >> >   (message "FOCUS TEST"))
> >> >
> >> > (add-function :after after-focus-change-function #'test--focus-out)
> >> > (make-frame)
> >> >
> >> > On macOS, this code runs fine if you click on the other frame. But if
> >> > using the keyboard shortcut Command-` the event doesn't fire. It seems
> >> > to be some interaction in the keydown event function where emacs_event
> >> > is cleared before the call to windowDidBecomeKey.
> >>
> >> I haven't tested the recipe, but perhaps Alan has some comments here
> >> (added to the CCs).
> >
> > Interestingly the NS port only generates Emacs events for things that
> > happen within the NS run loop, which excludes many things that are
> > initiated by Emacs itself.
> >
> > I'm not sure how to fix this as I'm not sure why it's set up this way.
> 
> Is there anything I can do to help?

Probably not at the moment. I think we need to rewrite the NS event
code so it will create events any time, and then test it to see if it
causes problems. I can't see any way it will, but I don't know why
it's written this way, so maybe I'm missing something.
-- 
Alan Third





      reply	other threads:[~2021-08-29  9:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 16:17 bug#47731: 28.0.50; Switching frame via keyboard does not fire focus change event Sean Farley via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06  9:54 ` Lars Ingebrigtsen
2021-05-06 17:57   ` Alan Third
2021-08-29  3:23     ` Sean Farley via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-29  9:38       ` Alan Third [this message]

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=YStVns9nBych2Vt+@idiocy.org \
    --to=alan@idiocy.org \
    --cc=47731@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=sean@farley.io \
    /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).