
On Mon, Dec 26, 2011 at 8:33 AM,
Thanks for the quick answers.
I dont really know, what timer functions there are, I googled "timing, scheduling, delaying in haskell", but the only function I found, was threaddelay. How did you mean "adding a timer"?
This is Gtk+ stuff, since the main loop is there. I'm talking about using timeoutAdd [1]. Note that although the docs begin by saying that the function is called at regular intervals, you just need to make sure to return False to avoid that. [1] http://hackage.haskell.org/packages/archive/glib/0.12.2/doc/html/System-Glib...
On the other side, I checked Graphics.UI.Gtk.Gdk.drawWindowProcessUpdates. I guess, I should use this in the function, where I draw something, and wait, and draw something else, and I should put it between the two drawing steps to get an immediate update. If I do so, the drawing gets blocked again, and nothing happens for some second, and then everything is drawn at the same time.
Even if you're able solve this particular problem, your application still won't be processing events. It will feel slugish and it's possible that the window manager may decide that it has crashed. Cheers, -- Felipe.