help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining whether Emacs is in focus


From: Aidan Gauland
Subject: Determining whether Emacs is in focus
Date: Wed, 28 Mar 2012 19:20:09 -0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0

Hi,

Is there a way to find out if *any* Emacs frames are in focus in the
window manager?  I'm trying to set up notifications for ERC, but only
when Emacs is not in focus.  I haven't been able to find anything about
this in the manual—it seems that you can only find out which frame is
currently active—and apropos has turned up nothing relevant.  I asked in
#emacs on freenode: some people said they use window-manager-specific
hacks, and someone suggested looking at hoe
`cursor-in-non-selected-windows' is used, but the only occurrence of
that in the elisp files is for its definition, so I can only assume it
is used by the C part of Emacs.

So, can Emacs tell me itself, or do I have to resort to a
window-manager-specific hack?

Regards,
Aidan Gauland


reply via email to

[Prev in Thread] Current Thread [Next in Thread]