[Haskell-cafe] gtk2hs problem
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Tue Nov 20 20:11:31 EST 2007
On Tue, 2007-11-20 at 15:18 -0800, Gregory Propf wrote:
> I'm using the Gtk.timeoutAddFull function to do the animation.
Are you using the threaded rts? Are you linking the program with
-threaded?
Are you doing the drawing directly in the timeout function or just
invalidating the window/widget and letting it get redrawn?
See for example the cairo clock demo which animates the hands of the
clock every second:
timeoutAdd (widgetQueueDraw window >> return True) 1000
In general it is much better to only ever draw to a window or widget
during that widget's expose event.
Duncan
More information about the Haskell-Cafe
mailing list