[comp.windows.x] getting location of widget

sandra@cs.arizona.edu (Sandy Miller) (10/23/89)

I have an application that uses the Athena widgets and runs under TWM.
When a widget is moved by the user using TWM's title bar, and then the
application attempts to get the location of the widget using XtGetValues,
the X and Y values returned are the location of the widget *before* it
was moved.  The widget is a popup shell widget.  If it is popped down
and back up, XtGetValues returns the correct location.

Is there any way to get around this?  Any help will be appreciated.  

Thanks in advance.
Sandy Miller

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (10/27/89)

> I have an application that uses the Athena widgets and runs under TWM.
> When a widget is moved by the user using TWM's title bar, and then the
> application attempts to get the location of the widget using XtGetValues,
> the X and Y values returned are the location of the widget *before* it
> was moved.  The widget is a popup shell widget.  If it is popped down
> and back up, XtGetValues returns the correct location.

> Is there any way to get around this?  Any help will be appreciated.  

This is a known bug.

There are two simple solutions.

1) Wait for R4 and your problem will go away.

2) Use XTranslateCoordinates() to get the actual location of the window w.r.t
   the root window.

						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213