Bug 830760

Summary: Don't grab mouse cursor on client --> server mouse mode switch
Product: Red Hat Enterprise Linux 6 Reporter: David Jaša <djasa>
Component: spice-gtkAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, byount, cfergeau, cwei, dallan, dblechte, desktop-qa-list, juzhang, lcui, lnovich, lyarwood, marcandre.lureau, mazhang, mjenner, mzhan, pvine, ssekidde, tzheng, zpeng
Target Milestone: betaKeywords: ZStream
Target Release: 6.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-gtk-0.20-1.el6 Doc Type: Enhancement
Doc Text:
No description necessary
Story Points: ---
Clone Of:
: 873272 (view as bug list) Environment:
Last Closed: 2013-11-21 08:24:21 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: 873272    

Description David Jaša 2012-06-11 11:14:30 UTC
Description of problem:
Don't grab mouse cursor on client --> server mouse mode switch. This is a minor annoyance but spice-client doesn't suffer with it.

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-9.el6.x86_64
spice-gtk-0.11-11.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. connect to linux guest
2. have the keyboard focus in the client
3. switch to the console (using ctrl-alt-Fx from Send Key menu)
  
Actual results:
mouse pointer gets grabbed

Expected results:
mouse pointer remains intact

Additional info:
this could go to ZStream (proposed) to avoid unnecessary "feel" changes in spicec -> remote-viewer transition.

Comment 1 RHEL Program Management 2012-07-10 08:49:40 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2012-07-11 02:01:58 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 3 Marc-Andre Lureau 2013-03-20 20:37:42 UTC
That will have the side effect that any crash/stop of the vdagent will result in mouse being "released", even if the user is doing mouse grabbing. Not only grabbing, but mouse move as well.

I believe it's more important to keep the mouse continuously working even if vdagent is stopped or crash.

If the mouse is already in the context of the client, why shouldn't it be till there, even if switching to console? However, if the mouse is not over the display, I think it would make sense to not take the grab.

Agree with the above?

Comment 4 Marc-Andre Lureau 2013-03-20 20:52:30 UTC
(this "minor annoyance" should not occur if the guest is configured with usb tablet)

Comment 5 Marc-Andre Lureau 2013-03-23 00:31:10 UTC
*** Bug 920822 has been marked as a duplicate of this bug. ***

Comment 7 David Jaša 2013-04-12 09:41:18 UTC
(In reply to comment #3)
> That will have the side effect that any crash/stop of the vdagent will
> result in mouse being "released", even if the user is doing mouse grabbing.
> Not only grabbing, but mouse move as well.
> 
> I believe it's more important to keep the mouse continuously working even if
> vdagent is stopped or crash.
> 
> If the mouse is already in the context of the client, why shouldn't it be
> till there, even if switching to console? However, if the mouse is not over
> the display, I think it would make sense to not take the grab.
> 
> Agree with the above?

I think that the line should be drawn a bit further: the cursor should be kept inside only if some button is pressed, iow if user is performing drag'n'drop - but if that would be hard, then I'm in favor of releasing the mouse always.

The reasoning is:
1) the odds of agent crashing while user performs dnd - the only possibly destructive scenario - is quite low
2) when agent crashes while user works with mouse and the mouse is released, it's matter of one click on button that user already holds == almost non-event
3) the odds of user having mouse pointer on top of client while something ordinary happens that would grab the cursor are pretty high compared to 1) - just logout can o it (on linux and iirc on XP VMs)
4) the action to release the cursor suddently is quite annoying - having to interrupt what you are currently doing, take you hand off the mouse, press the key combo (RHEV's shift-f12 isn't exactly left-hand-friendly key combo), return the hand back to mouse, resume the action you did want to actually do

Comment 8 Marc-Andre Lureau 2013-04-29 23:46:27 UTC
sent proposed patch to ML:

http://lists.freedesktop.org/archives/spice-devel/2013-April/013221.html

Comment 17 errata-xmlrpc 2013-11-21 08:24:21 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.

http://rhn.redhat.com/errata/RHBA-2013-1577.html