Bug 548430

Summary: Stop grabbing keyboard focus!
Product: [Fedora] Fedora Reporter: Tom Horsley <horsley1953>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: berrange, crobinso, hbrock, jforbes, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: virt-manager-0.8.3-2.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-09 01:44:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Horsley 2009-12-17 12:51:12 UTC
Description of problem:

I run fvwm. I have focus set to follow mouse, yet every time I start
virt-manager, then try to type something in an xterm, when I hit "Return",
virt-manager pops up the "New VM" dialog. My mouse is in the xterm,
why on earth is virt-manager intercepting my Return key?

If I cancel the dialog, click in the xterm, then I can type normally.

Version-Release number of selected component (if applicable):
virt-manager-0.8.0-7.fc12.noarch
fvwm-2.5.26-4.fc12.x86_64

How reproducible:
Every single time.

Steps to Reproduce:
1. In xterm where I have ssh'ed to virtual host machine
2. virt-manager > /dev/null 2>&1 &
3. Hit return in xterm after virt-manager window appears.
  
Actual results:
Dadgum new VM dialog popup

Expected results:
Return key in xterm

Additional info:

Comment 1 Daniel Berrangé 2009-12-17 13:11:12 UTC
The only point virt-manager actively grabs keyboard focus is when interacting with a guest VNC console. Any other time, virt-manager is explicitly given keyboard focus by the window manager. So this just sounds like an fvwm bug, or fvwm mis-configuration to me.

Comment 2 Tom Horsley 2009-12-17 15:30:13 UTC
I just made a brand new user with the default gnome and metacity environemnt,
ran gconf-editor to set the metacity settings to follow mouse and disable
the "smart" focus for new apps, and virt-manager still grabs the focus when
I start it in this environment as well.

No other apps I tried (gnome-terminal, system-config-printer, to pick a
couple at random) grabbed the focus. Only virt-manager seems to suffer
from this disease, so I don't think it is a fvwm problem since I have now
eliminated fvwm from the equation.

Comment 3 Cole Robinson 2010-02-27 01:16:02 UTC
Thanks for the info Tom, I was able to reproduce with the metacity gconf settings. Oddly enough, I just inadvertently fixed this a few days ago, with a cset that I thought was just a very minor cleanup:

http://hg.fedorahosted.org/hg/virt-manager/rev/962e52a4b4c0

Apparently calling show() twice (or maybe present() after show()) was causing the improper focusing. Moving to POST.

Comment 4 Fedora Update System 2010-03-22 01:54:29 UTC
virt-manager-0.8.2-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/virt-manager-0.8.2-3.fc12

Comment 5 Fedora Update System 2010-03-22 16:33:09 UTC
virt-manager-0.8.3-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/virt-manager-0.8.3-2.fc13

Comment 6 Fedora Update System 2010-03-23 23:22:57 UTC
virt-manager-0.8.3-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update virt-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/virt-manager-0.8.3-2.fc13

Comment 7 Fedora Update System 2010-03-23 23:31:22 UTC
virt-manager-0.8.2-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update virt-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/virt-manager-0.8.2-3.fc12

Comment 8 Fedora Update System 2010-04-09 01:43:42 UTC
virt-manager-0.8.2-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2010-04-09 03:55:11 UTC
virt-manager-0.8.3-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.