Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!agate!shelby!bloom-beacon!eru!luth!sunic!mcsun!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (R.L.Hesketh) Newsgroups: comp.windows.x Subject: Re: Where is my shell widget really positioned? Message-ID: <4362@harrier.ukc.ac.uk> Date: 10 Apr 90 08:59:23 GMT References: <4352@harrier.ukc.ac.uk> <9004091646.AA23161@lyre.MIT.EDU> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 40 In article <9004091646.AA23161@lyre.MIT.EDU> swick@ATHENA.MIT.EDU (Ralph R. Swick) writes: > 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 !? By "real" I mean the geometry that the user gives to the application either directly from the command line or via the resource database .. plus of course any movements the user has made using the window manager. >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?) Agreed .. but where are the session managers? I will be writing an equivalent of a window manager (actually a button manager) which will co-exist with the window manager. I probably won't have problems knowing the geometry then because my button windows will not be under the control of the window manager but under control of the button manager. >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. The hack I have used is to walk up the window tree and get the geometry of the parent window which is the child of the root window. By a best guess (it works under twm 8-) this should have the right geometry. It would be useful for users who currently don't have a session manager (most of us I guess) to be able to find out exactly where our windows are so that we can set up the resource database (of course we shouldn't be hacking these anyway if we had resource editors - coming soon) correctly. I currently have 4 different screen sizes I have to set for my environment to look similar on each one. What I am thinking of is a fix to xwininfo which takes into account the reparenting done by the window manager. Currently you have to subract the relative values from the absolute values .. minus any border width given by the window manager!