Hi,

I'm trying to get my program to monitor resize/position events,
so that when the program exits, I can save the last known geometry in 
some sort of 'preferences' file.

I am adding an event handler for StructureNotify to the TopLevelShell:

 XtAddEventHandler(topLevel,StructureNotifyMask,False,configureCB,myData);

This works fine, and my callback is called whenever the window is resized
or repositioned using the window manager (mwm).

However, when I'm just resizing the window, using any resize handle on the
window manager resize decoration, the x and y are set to zero in the
XEvent passed to the event handler callback.  I'm accessing the xconfigure
structure, like the X11 manual says.  (xev->xconfigure.x, xev->xconfigure.y).
The width and height memebers are correct.

When I reposition the window, using the window manager, the xevent's xconfigure
structure contains all the correct x, y, width, height member settings.

Q1: Anybody know why, when just resizing, the x and y are being set to zero?

Q2: Any other way to handle detecting and saving geometry changes?

I've tried using XtGetValues() on the topLevel widget when exiting my
application (before destroying any widgets) and all I get is garbage values
for the x, y, width, height resources.

Thanks
--