Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!psuvax1!rutgers!cunixf.cc.columbia.edu!cunixa.cc.columbia.edu!das15 From: das15@cunixa.cc.columbia.edu (Douglas A Scott) Newsgroups: comp.windows.x Subject: Re: XGetGeometry Keywords: XGetGeometry Message-ID: <1991May18.140847.346@cunixf.cc.columbia.edu> Date: 18 May 91 14:08:47 GMT References: <1991May14.152349.8968@doc.ic.ac.uk> Sender: usenet@cunixf.cc.columbia.edu (The Network News) Reply-To: das15@cunixa.cc.columbia.edu (Douglas A Scott) Organization: Columbia University Lines: 25 Nntp-Posting-Host: cunixa.cc.columbia.edu In article <1991May14.152349.8968@doc.ic.ac.uk> ms2@doc.ic.ac.uk (M Shelley) writes: >Beginner Alert >============== > >When I want to find the geometry of a window, I use XGetGeometry (surprise) >However, when I am using a window manager, I get strange results for the >position of the window. Presumably this is due to the window manager creating a >slightly larger window to accomodate the border etc and then reparenting >my window. > >How do I find the position of the window I created relative to the root rather >than its decoration window? I too would like to know this. I wrote a routine to recusively descend through the windows to the root in order to pinpoint the location of a particular window relative to the root (one that was *originally* a child of the root before the wm got ahold of it), but the trouble is, one can never tell just how many windows come between the one you want info about and the root. So post the answer to the newsgroup, if you would, someone. Thanks. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Douglas Scott Columbia University Computer Music Studio Internet: UUCP: ...!columbia!woof!zardoz!doug Phone: (703)765-4771