An odd DrawingArea problem



Hi folks,

imagine a GtkDrawingArea that doesn't have an expose_event
callback connected. Assume something has been drawn on this area.
If the DrawingArea is (partially) hidden under some other window
and then exposed again, nothing will happen on the freshly
exposed parts of the window, will it?

But it will: the exposed parts get painted in a light grey (the
typical gtk background color). There seems to be some underlying
expose event handler that does it, otherwise there would be stuff
left of the window that formerly obstructed the DrawingArea. My
question is: How can this be stopped?

The reason I'm asking is that in my application there's a
GtkDrawingArea which is used as a window to draw stuff through
libSDL (as suggested on this mailing list a few days ago). I've
connected an expose callback function which uses SDL to update
the screen content, but whenever the window gets exposed I see a
brief flash of the SDL-generated content which is immediately
painted over in grey by the ominous default handler. Of course
this is not what I want.

Any tips on how to avoid this?

Thanks,
--Daniel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]