On Tue, 2005-03-01 at 16:49 +0100, Franck Pommereau wrote: > Hi all, > > Before to perform some long computation, I would like to commit all > the pending events (and in particular the one which changes the mouse > cursor to a clock), so I use: > > while gtk.events_pending() : > gtk.main_iteration(gtk.FALSE) > > Unfortunately, if I used gobject.idle_add before, those idle events > will be proceeded too and I'll never get out of this loop. Does > anybody has an idea of how to flush all events but stopping at the > first idle ones?
I ran into the same issue once, but IIRC I worked around it. What I don't remember is if I did it by not iterating the pending events, or by avoiding the idle_add... :-/ -- Regards, -\- David Eriksson -/- SynCE - http://synce.sourceforge.net ScummVM - http://scummvm.sourceforge.net Desquirr - http://desquirr.sourceforge.net _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/