Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!samsung!think!snorkelwacker!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: Where is my shell widget really positioned? Message-ID: <9004091646.AA23161@lyre.MIT.EDU> Date: 9 Apr 90 16:46:35 GMT References: <4352@harrier.ukc.ac.uk> Sender: daemon@athena.mit.edu (Mr Background) Organization: DEC/MIT Project Athena Lines: 29 Position of toplevel returned by GetValues() = +202+221 Note that this is also what you'll get from XtTranslateCoords(w,0,0,...), so there's consistency. Is the toolkit correct for returning the absolute position on the screen or should it return the *real* geometry but but but the absolute position _is_ the real geometry !? Is the window manager correct in moving my window down and to the left to make way for its decorations? The wm is pretty much "correct" no matter what it does, so long as it follows the user's wishes. In this case the shell's window gravity indicates which way you should get moved to respect the user's geometry string. I have an application that needs to save state and wants to know where it is so that next time it is started up it can be placed in the same place. This part of the state you should probably leave up to the window (or session) manager. (Why don't you also want to preserve stacking order?) Retrieving a geometry string so that you can resign from the session and then re-joining it with the "same" geometry will require more help from the wm. You might be able to hack a sufficient substitute by assuming that the wm will place you at a consistent offset from your requested geometry and 9dynamically) measuring that offset.