Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1429611 - Alt-tab in multimonitor fullscreen is processed by client
Alt-tab in multimonitor fullscreen is processed by client
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: mingw-virt-viewer (Show other bugs)
4.1.0
Unspecified Unspecified
unspecified Severity high
: ovirt-4.2.0
: ---
Assigned To: Default Assignee for SPICE Bugs
SPICE QE bug list
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-06 11:56 EST by Andrei Stepanov
Modified: 2018-05-15 14:03 EDT (History)
12 users (show)

See Also:
Fixed In Version: mingw-virt-viewer-2.0-14.el7ev mingw-spice-gtk-0.31-7.el7ev
Doc Type: Bug Fix
Doc Text:
Previously, when multiple monitors were used in full screen mode, an application would lose the keyboard grab, so that keyboard input went to the client instead of the guest. The current release ensures that the keyboard grab/ungrab is triggered by the window's focus events, so that keyboard input goes to the guest.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-05-15 14:02:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Spice
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
RV log (363.07 KB, text/plain)
2017-03-06 12:02 EST, Andrei Stepanov
no flags Details
remote-viewer run with set SPICE_DEBUG=1 (89.87 KB, text/plain)
2017-03-07 04:51 EST, Andrei Stepanov
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1543 None None None 2018-05-15 14:03 EDT

  None (edit)
Description Andrei Stepanov 2017-03-06 11:56:29 EST
ALT-TAB menu of Client is displayed in fullscreen mode.

Guest is Windows7_64 or RHEL74.

Client is: spice-client-msi-x86-4.1-6.el7ev.noarch

How reproducible: always

Steps to Reproduce:
1. Have a client with 2 displays.
2. Connect to VM in full-screen. Open some applications in guest VM, like a text editor, calculator browser, etc.
3. Click with a mouse in display#1.
4. Move with mouse cursor to either display of guest.
5. Click with a mouse in display#2.
6. Press ALT-TAB

Actual results: ALT-TAB menu of Client is displayed.

Expected results: ALT-TAB menu of Guest should be displayed.

Additional info: There was a bug: https://bugzilla.redhat.com/show_bug.cgi?id=1322914  This bug is different from previous bug in step #5.
Comment 1 Andrei Stepanov 2017-03-06 12:02 EST
Created attachment 1260475 [details]
RV log
Comment 2 Pavel Grunt 2017-03-07 01:41:09 EST
Keyboard grab is broken, what is client OS? Is it regression?

Snir, do you have a suggestion - it should be covered by your patch https://cgit.freedesktop.org/spice/spice-gtk/commit/?id=143ebfdf275a7743ca4332dc526991f8bd95124a

Andrei, we need full spice-gtk debug, try `set SPICE_DEBUG=1` instead of `remote-viewer --spice-debug`
Comment 3 Andrei Stepanov 2017-03-07 04:51 EST
Created attachment 1260733 [details]
remote-viewer run with set SPICE_DEBUG=1
Comment 4 Andrei Stepanov 2017-03-07 04:53:20 EST
Client is Windows10 32Bit

I cannot reproduce this bug with RHEL73 client:
spice-gtk3-0.31-6.el7_3.2.x86_64
spice-glib-0.31-6.el7_3.2.x86_64
spice-protocol-0.12.11-1.el7.noarch
virt-viewer-2.0-12.el7.x86_64
Comment 5 Pavel Grunt 2017-03-07 05:39:04 EST
(In reply to Andrei Stepanov from comment #3)
> Created attachment 1260733 [details]
> remote-viewer run with set SPICE_DEBUG=1

(remote-viewer.exe:130440): GSpice-CRITICAL **: try_keyboard_grab: assertion 'gtk_widget_is_focus(widget)' failed

It can be a Windows feature or a GTK feature

Can you check the same client on Win7 ?

Thanks
Comment 6 Victor Toso 2017-03-08 05:05:31 EST
I'm able to reproduce this with spice-client-msi-4.1-6 on windows 7x64 guest and windows 7x64 client.
Comment 7 Victor Toso 2017-03-08 05:28:15 EST
I can also reproduce this with latest upstream. So we also need to fix this upstream.

Andrei, could please reply to comment #2 about regression?
Comment 8 Snir Sheriber 2017-03-08 09:33:37 EST
Yes, reproduced on upstream for me too..

It seems like the focus catching on windows doesn't behave nicely as on linux. after some playing it's seems like the guest receives the alt-tab only when moving to display 2 is done by using alt-tab at the client (clicking is not enough for some reason)
Comment 9 Andrei Stepanov 2017-03-13 08:08:08 EDT
Win7 client has the same problem.
Tested with: Widnows 7 x86 + spice-client-msi-x86-4.1-6.el7ev.noarch
Comment 10 Victor Toso 2017-06-05 08:38:30 EDT
Proposed patch fixes the issue.
https://lists.freedesktop.org/archives/spice-devel/2017-June/037897.html
Comment 11 Andrei Stepanov 2017-08-02 04:46:35 EDT
Additional info.

This bug is has the same behavior for WIN key.


Steps to Reproduce:
1. Have a client with 2 displays.
2. Connect to VM in full-screen. Open some applications in guest VM, like a text editor, calculator browser, etc.
3. Click with a mouse in display#1.
4. Move with mouse cursor to either display of guest.
5. Click with a mouse in display#2.
6. Press WIN key.

Actual results: WIN key processed by client.
Comment 12 Snir Sheriber 2017-08-08 08:37:28 EDT
(In reply to Andrei Stepanov from comment #11)
> Additional info.
> 
> This bug is has the same behavior for WIN key.
> 
> 
> Steps to Reproduce:
> 1. Have a client with 2 displays.
> 2. Connect to VM in full-screen. Open some applications in guest VM, like a
> text editor, calculator browser, etc.
> 3. Click with a mouse in display#1.
> 4. Move with mouse cursor to either display of guest.
> 5. Click with a mouse in display#2.
> 6. Press WIN key.
> 
> Actual results: WIN key processed by client.

Indeed (and proposed patch should fix it also in this case).
Comment 13 Victor Toso 2017-11-22 08:51:04 EST
Patch upstream:

commit 178fe41e9fb8a50b72155becdd367820c88ef177
Author: Snir Sheriber <ssheribe@redhat.com>
Date:   Tue Jun 6 10:19:34 2017 +0300

    Grab keyboard based on focus in windows client
    
    Currently the client grabs keyboard based on session focus, on windows
    environment gtk sends grab_broken if wm_killfocus is received (when
    focus is changed) while the application has the grab. It means that
    when grab is based on the session, clicking inside focusless window
    will cause wm_killfocus to be sent towards the focused window, this
    will generate grab_broken event which follows by no grab at all.
    
    This patch expands the solution presented in 143ebfd to work also on
    windows client without causing grab_broken event.
    This is implemented a bit differently from linux, if on mouse entrance
    session already has focus, focus will be set to the current window,
    this will generate focus events that will release and take grab again
    without grab_broken event.
    
    Resolves: rhbz#1429611
    Related: rhbz#1275231
    
    Acked-by: Victor Toso <victortoso@redhat.com>
Comment 14 Sandro Bonazzola 2017-12-12 08:50:50 EST
This bug is in modified status but no patches are attached to it.
Can you please check if the fix is included in latest build and move to QE if so?
Comment 15 Victor Toso 2017-12-12 09:08:18 EST
(In reply to Sandro Bonazzola from comment #14)
> This bug is in modified status but no patches are attached to it.
> Can you please check if the fix is included in latest build and move to QE
> if so?

Changelog from 0.31-7.el7 build (in the Fixed in Version)

* Thu Nov 30 2017 Victor Toso <victortoso@redhat.com> - 0.31-7
- Grab keyboard based on focus in windows client
  Resolves: rhbz#1429611
- Do not hide devices on client if USB
  Resolves: rhbz#1431137
- Fix device arrival event logic
  Resolves: rhbz#1425961

See: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=629187

This fix is also in the latest build, 0.31-8.el7
Comment 21 errata-xmlrpc 2018-05-15 14:02:00 EDT
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://access.redhat.com/errata/RHBA-2018:1543

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