Bug 581912 - gui.py shouldn't try to emulate gtk's main loop
Summary: gui.py shouldn't try to emulate gtk's main loop
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 505006
TreeView+ depends on / blocked
 
Reported: 2010-04-13 15:30 UTC by Ales Kozumplik
Modified: 2014-09-30 23:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-11 14:17:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ales Kozumplik 2010-04-13 15:30:10 UTC
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 09:41:29 UTC
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 11:19:32 UTC
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 14:17:13 UTC
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


Note You need to log in before you can comment on or make changes to this bug.