[comp.windows.x] Why isn't expose event generated reliably?

slm@cs.arizona.edu (Sandy Miller) (05/31/91)

I have a rather complicated application using the Athena widgets and am
having an intermittent problem.

I have a display widget (widgetClass) inside a viewport widget 
(viewportWidgetClass) in a popup shell widget (applicationShellWidgetClass).
Associated with the display widget are a number of translations, including
expose, button down and up, etc.  Sometimes, after the window is popped up,
no expose event occurs as the display widget is scrolled within the viewport
widget.  All other events are processed correctly, and once something other
than the scroll is attempted, the expose works fine.

The first time the widget is popped up, it always works as it should.  But
(only SOMETIMES) after it is popped down and back up, it doesn't.  The
routine that is called in response to an expose event is called once when
the widget is popped up, but not when the display widget is scrolled.
Basically, what I see is the one window's width of the left-most part of
the display (which is generated in response to the original expose) and
the rest of the display is just blank.  In other words, the scrolling is
happening, but the routine to print the exposed part of the display is not
called.

I can't figure out why this is happening.  Has anyone else ever seen anything
similar to this problem?  Anyone have any ideas what I need to do to make it
work as it should?  I would even use a kludge, if it would cause the expose
routine to be called reliably.

-sandy