Bug 581912 - gui.py shouldn't try to emulate gtk's main loop
gui.py shouldn't try to emulate gtk's main loop
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 505006
  Show dependency treegraph
 
Reported: 2010-04-13 11:30 EDT by Ales Kozumplik
Modified: 2014-09-30 19:38 EDT (History)
3 users (show)

See Also:
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:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
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

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