Re: Introducing a small delay



On Tue, Dec 10, 2002 at 04:41:02PM -0500, Bryan Brown wrote:
On Tue, 10 Dec 2002, Bryan Brown wrote:

In my application I need to introduce a small time delay between the user
responding to a gnome dialog and the program starting to update a drawing
area.

I forgot to mention that the problem is that after the gnome dialog closes
I retrieve the drawing area image for subsequent processing, but the
remains of the dialog have not disappeared from the image yet.


You can't fix a race condition by lengthening the time delay; it just
hides the race condition in a larger percentage of instances.

The right fix is to draw to a GdkPixmap (which is always present), and
have your drawing area just be a way to display the pixmap.
i.e. drawing area expose_event handler just copies from the pixmap to
the drawing area. Or you can even use a GtkImage as the pixmap-display
widget.

Havoc




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