Bug 581912

Summary: gui.py shouldn't try to emulate gtk's main loop
Product: [Fedora] Fedora Reporter: Ales Kozumplik <akozumpl>
Component: anacondaAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: jonathan, jzeleny, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-11 09:17:13 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 505006    

Description Ales Kozumplik 2010-04-13 11:30:10 EDT
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:

http://bitbucket.org/aafshar/pygtkhelpers-main/src/tip/pygtkhelpers/gthreads.py
Comment 1 Ales Kozumplik 2010-04-14 05:41:29 EDT
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:

http://faq.pygtk.org/index.py?req=show&file=faq05.006.htp
Comment 2 Bug Zapper 2010-07-30 07:19:32 EDT
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Ales Kozumplik 2011-11-11 09:17:13 EST
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