From: Clifford Heath Date: 2005-08-15T22:11:13+09:00 Subject: Re: Asynchronous events in GTK application? Ok, I learnt some more, and I think I'm hung up on a GTK "feature". This is with the Debian Linux version that calls itself 0.9.1. My asynchronous device events cause a condition variable to get set. I've written a main loop that checks the variable, like this: while true processEvent if (@device_event) Gtk.main_iteration end (According to the documentation, I should use: break if Gtk.main_iteration but in this version, main_iteration always returns true. I guess that's a change from the 0.9.1 version.) In case there are no GUI events, I added a timeout which pumps the loop. If the timeout is set to 1000ms, 500ms, no problem. As soon as I drop the timeout much more (like 250ms or, what I'd like, 100ms) the display never gets refreshed. It seems that Gtk.main_iteration doesn't seem to ever process paint (expose) events if an event has occurred recently, including a timeout event(!). What I'd like is to inject a NULL event into Gtk's queue when an asynchronous event occurs, instead of using timeouts. But if I can just get the timeout down to 100ms, that would work also. Anyone have a solution to this? I wish the Debian packages weren't always so far behind :-(. Clifford Heath.