From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: burton.samogradNO@SP4M.gmail.com Newsgroups: gmane.emacs.help Subject: Re: Getting information from X11 windows (which window is active / has focus) Date: Fri, 29 Feb 2008 05:26:35 -0600 Organization: Aioe.org NNTP Server Message-ID: References: <083d9a20-88aa-470f-87ff-e6010a0fca36@q33g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204324510 14052 80.91.229.12 (29 Feb 2008 22:35:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Feb 2008 22:35:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 29 23:35:35 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVDpE-0000rX-PH for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Feb 2008 23:35:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVDoi-0005vm-7y for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Feb 2008 17:35:00 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.esat.net!feeder.news.heanet.ie!feeder.erje.net!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: zclCuZ14Nwh4+0sL4paLRw.user.aioe.org Original-X-Complaints-To: abuse@aioe.org Cancel-Lock: sha1:B0n+wCoKxd5zoQgXVumRK8cj5O0= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:156602 X-Mailman-Approved-At: Fri, 29 Feb 2008 17:34:41 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51972 Archived-At: fsmunoz@gmail.com writes: > Since the concept of visibility is not simple I am trying to go by > simple criteria like finding out which window is "active" or has > focus, and have found that querying the root window with "xprop" in > the command line gives me a '_NET_ACTIVE_WINDOW' atom that is what I > need. > > Is there any way to get this information using elisp? I have tried x- > window-property - which doesn't seem to be used many times from the > results I got from my google searches - but it requires a "frame" > argument, and I'm at a loss on how do I get a frame variable to refer > to a non-Emacs window... all the frame commands work with Emacs > frames, and the window with focus could perfectly and most likely be a > non-Emacs window... There might be some good examples of X/elisp integration in the code for the XEmacs Window Manager: http://www.xwem.org/ . It might not solve your problem but it could help with some examples... -- burton