Just do this:
while (gtk_events_pending())
gtk_main_iteration();
|
This code will handle all pending events, then return
control to you. You can also run nested instances of
gtk_main(); each call to gtk_main_quit() exits one
instance. gnome_dialog_run()
uses this technique to block waiting for user input.