home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!nec-gw!netkeeper!idaho!achan
- From: achan@idaho.tdd.sj.nec.com (Amy Chan)
- Subject: Re: Window the pointer is in?
- Message-ID: <1992Nov6.184759.25278@sj.nec.com>
- Sender: news@sj.nec.com
- Nntp-Posting-Host: idaho.tdd.sj.nec.com
- Organization: NEC-AM TDD, San Jose, California
- References: <1d8lhiINN27a@seven-up.East.Sun.COM>
- Distribution: na
- Date: Fri, 6 Nov 1992 18:47:59 GMT
- Lines: 21
-
- In article <1d8lhiINN27a@seven-up.East.Sun.COM> marc@betelgeuse.East.Sun.COM writes:
- >Hi,
- > How could I find the window ID of the topmost window that contains the mouse
- >pointer? If I do an XQueryPointer(dpy, root_window, ...), the returned
- >child window is a window manager window. However the window that I am looking
- >for is a leaf window of the window tree of an X client. Can this be done
- >without having to make recursive calls to XQueryTree(), followed by an XGetGeometry()
- >on each child window to figure out in which one the mouse pointer is in?
-
- This can be accomplished by making another call to XQueryPointer(), with
- the window ID of the window manager window as the 2nd argument. The child
- window ID returned then will be the child of the window manager window.
-
- Hope this helps.
-
- Amy
-
- --
- Amy Chan | E-Mail:
- NEC America Inc. | INTERNET: achan@tdd.sj.nec.com
- 110 Rio Robles, San Jose, CA 95134 | UUCP: ...{decwrl,oliveb}!necsun!achan
-