Hi, Drew.
Thanks for the feedback.
Unfortunately, no. The "focus in" and "focus out" events in Emacs fire
per frame. So alt-tabbing between Emacs frames will trigger a focus loss
event for the origin frame and focus gain for the destination frame
Initially I tried hacking in at the terminal level (nsterm.c, xterm.c,
and w32term.c) but I had difficulty figuring out how application
(opposed to frame) focus works under X. It's not clear to me that X
itself even *has* a concept of "active application" distinct from "frame
that has input focus". (Perhaps this concept exists at the window
manager level, but there are a lot of window managers...) I'm not even a
beginner at X programming, though, so maybe someone could point me in
the right direction?
The convenient thing about patching into the "focus in" and "focus out"
events is that they live up in frame.c, which appears to be
cross-platform.
Best,
Brian