Perhaps you could thread off the GTK piece of your app and wait in your primary thread while it runs.