gui.py provides a WaitWindow class. GTK Window is created and shown outside of the main loop, then computation we're waiting for continues. Finally we close and remove the window. To have the window displayed correctly we manually call gtk.main_iteration(False). This is highly discouraged because it can result in events not being processed for some reason or other craziness (I am currently seeing problems with gtk.gdk.Window's cursor not being updated on time).
ProgressWindow has the same problem.
The fix is either to use dialogs that support run() method or run the non-UI computation asynchronously, perhaps using something like:
This PyGTK FAQ entry also confirms it is not a wise idea to be changing cursor from the same thread the computation we are waiting for is running:
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.
More information and reason for this action is here:
There is an UI rewrite effort going on and hopefully the new UI will be smarter about returning to the gtk main loop.
Related to this is some experimental work I've done to separate the core Anaconda and the gtk UI into running in separate threads. See here: https://github.com/akozumpl/anaconda/tree/multi