home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / x / 18817 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.4 KB  |  35 lines

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