Finish a timeout (with gdk drawings) before continuing code



Hi everyone,

- firstly sorry if I don't follow standard conventions I'm new to this,
and sorry if im asking an answered q, I searched a bit (its so large!) but
couldn't find it.

I'm running a timeout to animate a drawing area before the window is
closed or another window is presented on top (basically i want 'wipe' the
UI images out of the screen).

I want the main program to cease execution until the timeout function has
completed.  I kind of achieved this by looping another main loop iteration
until i set an 'animation complete' variable (at the final timeout call).

However the timeout function is calling gdk drawing functions which seem
to be queed or something in the background - not executed straight away. 
Thus after the timeout completes, there are still 'drawing calls' in the
background, so when I destroy the window I get segmentation faults as it
is trying to draw on something which no longer exists (even though i
thought the drawing would have already been completed).

Is there any relatively easy way to hault the execution of my widget
destroy and window present functions until i am certain the drawing is
finished?  Or is there any better way of doing this - ie animating (note:
i really don't want to call the present and destroy functions IN the
timeout due to my program structure)?

Thanks,

Glenn




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