sphorton@sdrc.UUCP (Mitch_Horton) (02/19/90)
For some reason, whenever I call XGetWindowAttributes or XGetGeometry, the x, y value of the upper left hand corner of the window is -1, -1. Does anyone know why this happens and what I can do to get the correct values? Mitch Horton uunet!sdrc!sphorton :
toml@ninja.Solbourne.COM (Tom LaStrange) (02/22/90)
> For some reason, whenever I call XGetWindowAttributes or > XGetGeometry, the x, y value of the upper left hand corner > of the window is -1, -1. Does anyone know why this happens and > what I can do to get the correct values? I'll bet that you're doing the XGetWindowAttributes on your window that has been reparented by the window manager. The coordinates that you are seeing are relative to the window's parent which is probably a frmae window owned by the window manager. If you really want to know where on the root window your window is, you should track ConfigureNotify events or try XTranslateCoordinates(). -- Tom LaStrange Solbourne Computer Inc. ARPA: toml@Solbourne.COM 1900 Pike Rd. UUCP: ...!{boulder,sun}!stan!toml Longmont, CO 80501