Bug 1275231

Summary: Fullscreen multi monitor setup: Alt-Tab processed by client
Product: Red Hat Enterprise Linux 7 Reporter: Andrei Stepanov <astepano>
Component: spice-gtkAssignee: Victor Toso <victortoso>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: astepano, dblechte, fidencio, pgrunt, rbalakri, tpelka, uril, victortoso
Target Milestone: rc   
Target Release: 7.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-gtk-0.26-6.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1322914 1330652 (view as bug list) Environment:
Last Closed: 2016-11-04 01:12:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1322914, 1330652    
Attachments:
Description Flags
Example for Alt-Tab none

Description Andrei Stepanov 2015-10-26 10:17:15 UTC
Created attachment 1086440 [details]
Example for Alt-Tab

There is quite unpleasant behavior for fullscreen multi monitor setup.
Particularly, Alt-Tab event goes to client's windowmanager.
This can really confuse a user.

Bug takes place in setup with 2 (or more) real monitors.

Steps to reproduce:

1. Have a client with real two monitors.
2. Activate in virt-viewer additional monitors == real monitors.
3. Connect to VM with virt-viewer --full-screen

Each virtual display should be positioned on real monitor.

4. Move mouse pointer to one of displays. Open a window.
5. Move mouse pointer to other display. Do not click mouse.
6. Press: Alt-Tab.

Alt-Tab will be processed by client's WM.

There is work around: always click with mouse as you move to another display.
Nonetheless I find this behavior very annoying.

See attached screenshot.

Comment 2 Fabiano Fidêncio 2015-10-26 10:41:05 UTC
Testing here (using rhel-7.2/f22 client connecting to rhel-7.2/f22 guest) and the only way to have the Alt+Tab handled by the client's Window Manager is when pressing Alt+Tab with the top menu (that contains the "Leave Fullscreen" button) focused.

Comment 3 Andrei Stepanov 2015-10-26 10:51:15 UTC
My setup has client 7.2
It doesn't depend on guest type.
It is reproducible without invocation the menu at the top.

Comment 4 Fabiano Fidêncio 2015-10-26 23:33:16 UTC
Hmm. I take the comment 2 back, I _can_ reproduce it here and it's quite interesting :-)
Every time you move the mouse from one display to another spice-gtk ungrabs the mouse and any keyboard event goes to the client's DE.

I can easily reproduce it with just one remote-viewer window, windowed mode, vertically maximized (Alt + {right,left}, when using GNOME). Just move the mouse to the "guest's area" without do any click and then press Alt + Tab, same behavior.

Andrei, does it happen with 6.7/rhevm clients as well? Can you check if it's a regression?

As I said before, I am able to reproduce it and I am using upstream spice-gtk/virt-viewer.

Comment 5 Fabiano Fidêncio 2015-10-27 16:48:53 UTC
Proposed a patch upstream for spice-gtk:
http://lists.freedesktop.org/archives/spice-devel/2015-October/022793.html

Comment 6 Pavel Grunt 2015-11-02 17:38:43 UTC
(In reply to Fabiano Fidêncio from comment #5)
> Proposed a patch upstream for spice-gtk:
> http://lists.freedesktop.org/archives/spice-devel/2015-October/022793.html

Currently the keyboard grab (redirection of key events) is related to a SpiceDisplay (virt-viewer's window), we can make it related to the application (session). IE if mouse is over any window of virt-viewer and any virt-viewer's window has the focus, then key events should be redirected.

Comment 7 Uri Lublin 2015-11-05 08:52:38 UTC
To reproduce at step 4 (from comment 0) I
4. Move mouse pointer to one of displays and left-click in it.

Comment 10 Andrei Stepanov 2016-03-30 16:49:26 UTC
I cannot reproduce the bug with:

spice-glib-0.26-7.el7.x86_64
spice-gtk3-0.26-7.el7.x86_64
virt-viewer-2.0-7.el7.x86_64
spice-glib-devel-0.26-7.el7.x86_64

Comment 12 errata-xmlrpc 2016-11-04 01:12:18 UTC
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-2229.html