Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Running a RHEL 7 system with 2 monitors with a Windows VM in full-screen mode on the second monitor, when closing or minimizing a window on the primary monitor, virt-viewer always steals the window focus. Keystrokes are sent to the Windows VM.
Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Workstation release 7.0 (Maipo)
virt-manager-0.10.0-20.el7.noarch
virt-viewer-0.5.7-7.el7.x86_64
virtio-win-1.7.0-1.el7.noarch
How reproducible:
100%
Steps to Reproduce:
1. Create a Windows VM (though possibly any VM would work), start virt-viewer and open in full-screen mode on a secondary monitor.
2. Start notepad in the Windows VM.
3. Go back to the primary monitor and open gnome-terminal and start typing any command, but don't press enter.
4. Open some other application such as Firefox then minimize it.
5. Start typing and see keystrokes are now showing in notepad on the Windows VM rather than typing in the gnome-terminal window.
Another application example:
1. Start the gnome Tweak Tool.
2. Click on Shell Extensions.
3. Click on one of the extension configuration icons such as Alternatetab.
4. Close the Extension Preference window.
5. Virt-viewer steals focus again and you have to click on the Tweak Tool window to return to what you were doing.
Actual results:
Virt-viewer steals focus via sloppy focus.
Expected results:
Virt-viewer running in full-screen mode steals window focus rather than continuing to work in the last running application in the host Linux OS.
I can reproduce this, but it's not specific to virt-viewer. It happens to any application that is in fullscreen mode. If you change the steps above to use firefox in fullscreen mode (or any other app that can be fullscreened), the behavior is the same. Re-assigning to mutter.
An additional update from the customer about similar behavior:
- Create two gnome-terminal windows
- Start another application, such as firefox and go to any website
- Click in one of the gnome-terminal windows and minimize it
- Focus goes to the other gnome-terminal window instead of firefox
I would expect focus to return to firefox since it was the most recently active window before clicking in/minimizing one of the gnome-terminal windows. The "converse" scenario also happens with 2 firefox windows and 1 gnome-terminal. It's like the window manager always wants to give window focus to any running "like" application when one is minimized rather than the one most recently used.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-2258.html