Bug 922818 - stealing focus from remote-viewer with grabbed mouse results in non-functional keyboard
Summary: stealing focus from remote-viewer with grabbed mouse results in non-functiona...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: mingw-virt-viewer
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.3.0
Assignee: Marc-Andre Lureau
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1019461
TreeView+ depends on / blocked
 
Reported: 2013-03-18 15:30 UTC by David Jaša
Modified: 2015-09-22 13:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, when using a Windows client, pressing "CTRL+ALT+DEL" while the mouse pointer was captured by the guest would cause an error due to Windows automatically opening the Task Manager Security Settings windows. This would result in the keyboard and mouse becoming unresponsive within the guest. Now, the pointer is correctly released after such events, allowing the guest window to appropriately regain control again after the event is finished.
Clone Of:
Environment:
Last Closed: 2013-07-12 16:55:55 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libspice-client-gtk-2.0-4.dll (187.57 KB, application/octet-stream)
2013-05-15 16:56 UTC, Marc-Andre Lureau
no flags Details
libspice-client-gtk-2.0-4.dll x32 bits (454.01 KB, application/x-ms-dos-executable)
2013-06-07 13:34 UTC, Marc-Andre Lureau
no flags Details

Description David Jaša 2013-03-18 15:30:00 UTC
Description of problem:
stealing focus from remote-viewer with grabbed mouse results in non-functional keyboard

Version-Release number of selected component (if applicable):
mingw-virt-viewer 0.5.3-20 (windows XP but that shouldn't matter)

How reproducible:
always

Steps to Reproduce:
1. connect to a guest with server mouse mode from windows client
2. grab mouse in the guest
3. press ctrl-alt-delete
  
Actual results:
ctrl-alt-del gives focus to task manager or lock/logoff/... screen. In both cases, the mouse is force-taken from mingw-remote-viewer and it can not cope with it:
  * keyboard won't work in the guest in this r-v session
  * if remote-viewer window doesn't cover geometrical center of the client screen, it isn't possible to enter the r-v window until the "grabbed" mouse is released (similar to bug 857430 but the mouse recovers)

Expected results:
both keyboard and mouse focus is gracefully released and can be regained by another click into the window

Additional info:

Comment 1 Marc-Andre Lureau 2013-03-26 12:18:00 UTC
windows 7 doesn't seem to be affected by this bug.

I also guess this bug is intimately related to bug 857114

Comment 2 Marc-Andre Lureau 2013-03-26 12:19:52 UTC
and this bug shouldn't happen if the guest is configured with a tablet (which it should)

Comment 3 Marc-Andre Lureau 2013-03-26 13:19:32 UTC
what version of remote-viewer and windows could you reproduce this bug with?

I am trying to reproduce on windows xp &  with mingw32-virt-viewer-0.5.3-22.el6ev.noarch.rpm, no success so far.

a video perhaps could help?

thanks

Comment 4 Marc-Andre Lureau 2013-03-26 15:56:08 UTC
ok, got it, I was using default key binding, so it was releasing the grab when pressing ctrl-alt...

Comment 5 Marc-Andre Lureau 2013-03-26 20:35:18 UTC
I have patch that works, I think we should include it in the windows build, even if it may needs more discussion upstream.

http://lists.freedesktop.org/archives/spice-devel/2013-March/012858.html

Comment 6 Marc-Andre Lureau 2013-03-27 15:08:48 UTC
fixed in mingw-spice-gtk 0.14-5

Comment 9 Vaclav Ehrlich 2013-05-14 15:10:25 UTC
mingw-virt-viewer 0.5.3-25.el6ev
client Windows 7 32bit
guest Windows XP 32bit


When Ctrl+Alt+Delete is pressed client lock/logoff screen shows up. When user cancel this screen, mouse is free in client. When click into mingw-virt-viewer window the mouse pointer is hold by guest. This is the right behaviour. 
That is bad is that typing keyboard is not working. i.e. User is not able to write in notepad. After pressing CRTL key on keyboard everything is ok (or after releasing captured mouse pointer and clicking into menu of mingw-virt-viewer... i.e. Help->About and back to the mingw-virt-viewer window.)

Comment 10 Marc-Andre Lureau 2013-05-14 15:17:25 UTC
(In reply to comment #9)
> mingw-virt-viewer 0.5.3-25.el6ev
> client Windows 7 32bit
> guest Windows XP 32bit
> 
> 
> When Ctrl+Alt+Delete is pressed client lock/logoff screen shows up. When
> user cancel this screen, mouse is free in client. When click into
> mingw-virt-viewer window the mouse pointer is hold by guest. This is the
> right behaviour. 
> That is bad is that typing keyboard is not working. i.e. User is not able to
> write in notepad. After pressing CRTL key on keyboard everything is ok (or
> after releasing captured mouse pointer and clicking into menu of
> mingw-virt-viewer... i.e. Help->About and back to the mingw-virt-viewer
> window.)

what you describe seems to be somehow related to bug 924577, some modifiers are seen still pressed because the widget didn't receive the release event. The patch proposed there should also solve that.

Comment 11 Marc-Andre Lureau 2013-05-15 16:56:07 UTC
Created attachment 748412 [details]
libspice-client-gtk-2.0-4.dll

Since I fail to reproduce in VM, and my only HW windows machine died, can I ask you to check with the provided 32bit dll? Just copy/replace over the installed $prefix/bin

thanks

Comment 12 David Blechter 2013-05-16 14:01:19 UTC
it is not a blocker for 3.2, and should be solved in 3.3/3.2.z

Comment 14 Marc-Andre Lureau 2013-05-27 14:02:38 UTC
Vaclav, could you check with the provided dll? thanks

Comment 15 Vaclav Ehrlich 2013-06-06 15:08:27 UTC
Hi Marc,
I've copied dll into bin directory, but remote-viewer could not be then started ... (even only with --version parameter)

Comment 16 Marc-Andre Lureau 2013-06-06 15:18:48 UTC
(In reply to Vaclav Ehrlich from comment #15)
> Hi Marc,
> I've copied dll into bin directory, but remote-viewer could not be then
> started ... (even only with --version parameter)

Have you tried on 32bit installations? What error do you get?

thanks

Comment 17 Vaclav Ehrlich 2013-06-06 16:01:34 UTC
(In reply to Marc-Andre Lureau from comment #16)
> (In reply to Vaclav Ehrlich from comment #15)
> > Hi Marc,
> > I've copied dll into bin directory, but remote-viewer could not be then
> > started ... (even only with --version parameter)
> 
> Have you tried on 32bit installations? What error do you get?
> 
> thanks

Yes. I have Win7/32 and 32bit virt-viewer. I've got no error. remote-viewer just did not start. No logs, no error for me.

Comment 18 Marian Krcmarik 2013-06-07 13:03:22 UTC
(In reply to Marc-Andre Lureau from comment #16)
> (In reply to Vaclav Ehrlich from comment #15)
> > Hi Marc,
> > I've copied dll into bin directory, but remote-viewer could not be then
> > started ... (even only with --version parameter)
> 
> Have you tried on 32bit installations? What error do you get?
> 
> thanks

Is it possible the library was built based on different libraries from what we use in latest 3.2 client? we have access only to latest 3.2 mingw-virt-viewer from brew, maybe there is a conflict?

Comment 19 Marc-Andre Lureau 2013-06-07 13:34:43 UTC
Created attachment 758159 [details]
libspice-client-gtk-2.0-4.dll x32 bits

rebuild the dll

Comment 21 Marc-Andre Lureau 2013-06-07 13:38:27 UTC
Could somebody check with that new dll? thanks

Comment 22 Vaclav Ehrlich 2013-06-07 14:02:45 UTC
It's the same.

virt-viewer\bin> ~\Downloads\md5sums.exe .\libspice-client-gtk-2.0-4.dll
libspice-client-gtk-2.0-4.dll                  6a631140ea5adf600c2a14b3715b8ed2

Comment 23 Marc-Andre Lureau 2013-06-07 14:11:44 UTC
(In reply to Vaclav Ehrlich from comment #22)
> It's the same.
> 

You mean it doesn't start either?

Comment 24 Vaclav Ehrlich 2013-06-10 13:45:35 UTC
Sorry I wrote it bad. It could be started. But the bug remain and the functionality is the same as without the new dll.
Sorry for it.

Comment 25 Marc-Andre Lureau 2013-06-21 16:59:57 UTC
I tried on a bare-metal win7, using mingw-virt-viewer-0.5.3-27.el6ev.

I tested with default ctrl-alt and custom shift-f12 ungrab combinations. I couldn't reproduce any keyboard issue in guest notepad or client notepad after leaving the lock screen.

Can you try again with this release?

thanks

Comment 26 David Jaša 2013-07-12 16:32:25 UTC
I tested on win xp and win 7 64b clients and the issue is gone.

Comment 27 Marc-Andre Lureau 2013-07-12 16:55:55 UTC
Vaclav, without further details from you, closing this bug, since the original reported say it is fixed for him too. feel free to reopen with details.

thanks

Comment 28 David Jaša 2015-01-07 14:44:46 UTC
Removing needinfo on Spice QE members from closed bugs.


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