On Thu, 25 Mar 2004, Christian Robottom Reis wrote:

> Actually, this works as expected in GTK+ 1.2 -- the loop only fires when
> there are events pending (I move my mouse or focus the window) and the
> rest of the time it seems to block inside mainiteration as you'd hope it
> did. So if it *is* broken in GTK+ 2.x, then it *is* a bug :-)

This appears to be two separate problems.

Problem #1 is a Gtk bug.  The gtk_main_iteration() functions simply do not
return the correct values to allow you to take control of the gtk main
loop.  This has been filed as bug #138161 in bugzilla.gnome.org and a C
test case attached.  You folks might want to try it against 1.2 and 2.4
and add the results to the bug report.

Problem #2 is the unblocking without events.  This appears to be a PyGtk
issue.  Even though Gtk returns the wrong value for gtk_main_iteration(),
it does block correctly.  It appears that PyGtk adds some flavor of event
timer which causes the event loop to kick loose every .1 seconds.

Problem #2 is not a big deal, but it should definitely be documented
somewhere.  It has been filed as bug #138163.

-a
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to