|
From: | Drew Adams |
Subject: | RE: [PATCH] frame.c: focus hooks |
Date: | Mon, 18 Nov 2013 06:53:44 -0800 (PST) |
Hi Brian, Hm. That's too bad. I was hoping for Emacs vs outside focus changes, especially since the use case examples given suggested that. I wouldn't want a buffer to get saved just because I switched Emacs frames, for instance (but I recognize that someone else might). Let's please make this crystal clear in the doc and names of functions etc. And in the use-case examples we provide in the doc, if any. Anyway, I'm in favor of adding such hooks. Thx - Drew 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 On Sun, Nov 17, 2013 at 5:33 PM, Drew Adams <address@hidden> wrote: > I'd like to contribute the attached patch, which adds hooks into Sounds useful. |
[Prev in Thread] | Current Thread | [Next in Thread] |