Path: utzoo!attcan!uunet!snorkelwacker!bu.edu!orc!decwrl!jumbo!src.dec.com!msm From: msm@src.dec.com (Mark S. Manasse) Newsgroups: comp.windows.x Subject: Re: how do you get correct window position? Keywords: tough luck Message-ID: <1990Jun14.091550.1887@src.dec.com> Date: 14 Jun 90 16:15:50 GMT References: <9006131913.AA02147@intrepid.itstd.sri.com> <1990Jun14.060559.9821@wrl.dec.com> Sender: news@src.dec.com (News) Reply-To: msm@src.dec.com (Mark S. Manasse) Organization: DEC Systems Research Center Lines: 24 Unfortunately, you can't do this, at least not with a fully ICCCM-compliant window manager. The ICCCM, as adopted, insists that the placement of a window is specified by a relative positioning for a corner or edge of the window, including decoration. There's no way to specify the absolute position of any pixel of your window. However, you can compute the difference between where you asked to pop up initially, and where you showed up. Since the decoration geometry for a window will *typically* be unchanged the next time the same window shows up, you might try adjusting your request by that difference. Hania Gajewska and I used that technique to allow us to move windows back to where they came from in our rooms manager. There's no guarantee that it will work, but there's some hope. You could, instead, try to figure out which ancestor window is the frame provided by the window manager, discover its geometry, and then try to bias by that amount. I suspect that you would discover that many ICCCM window managers will still disagree by a few pixels (say, by a border width or so for that frame window) on exactly where to place your window. Mark