|  | Hi Dick,
	Yes it worked ok. There were however a few learnings if your interested:
1) I created an event handler with a call to the toolkit routine
   XtAddEventHandler. The most appropriate event mask seemed to be
   StructureNotifyMask which notifies the user of more events than just
   resizing the window. (See Xlib Programming: MIT C Binding)
2) To determine the type of event I used the Xlib routine XPeekEvent to get
   the event structure. Once I had this I could examine the "type" member
   to ascertain the cause of the event. ConfigureNotify, (22 in decimal)
   appears to be the type that indicates a window resize.
3) Because the window in question was a scroll window, any routines that removed
   the event from the input queue, for example XCheckIfEvent or XNextEvent,
   prevented the window from being redisplayed correctly after
   a resize operation. i.e. scroll bars didn't move to the edge of the window,
   the window appeared transparent, only the boarder was resized. Hence
   XPeekEvent was used.
4) Also note, that because it is a scroll window, when it is resized several
   other events are generated and captured by the event handler as a result
   of the resize. Only look at the first one that XPeekEvent returns if you
   want to determine the original cause of the event.
I hope this may be useful to others, my reservation is that because it is a 
reply it may be passed over. Anyway it was good of you to point me in the
right direction. Thanks again!
Regards,
Pete Francis @BIO
 |