Path: utzoo!attcan!uunet!stan!ninja!toml From: toml@ninja.Solbourne.COM (Tom LaStrange) Newsgroups: comp.windows.x Subject: Re: how do you get correct window position? Message-ID: <1990Jun14.142654.987@Solbourne.COM> Date: 14 Jun 90 14:26:54 GMT Sender: news@Solbourne.COM Organization: Solbourne Computer, Inc. Lines: 26 >>How do I get the *correct* (x,y) position of the window belonging to >>the shell widget so I can create another one in exactly the same >>place? > > If you have an ICCCM-compliant window manager (as I belive the R4 twm is) > XtTranslateCoords should do the trick for you. Yes but if he wants the new window to be positioned at the same location as the already reparented one, doesn't he really need the coordinates of the window manager's outside frame window? As far as I know, there is no way for an application to find the window manager's outside frame window. You can't simply find the ancestor that's on top of the root, what if the window manager has placed its frame on a "pseudo" root that's a child of the real root window. I personally would like to see a WM_ROOT property placed on client windows that would contain the window ID of the "root" window for the client. The client would then be able to find the window manager's outside frame window and it would also allow window managers to do interesting things with "pseudo" root windows. -- Tom LaStrange Solbourne Computer Inc. ARPA: toml@Solbourne.COM 1900 Pike Rd. UUCP: ...!{boulder,sun}!stan!toml Longmont, CO 80501