Bug 998529

Summary: Mouse pointer appears black on PuTTY terminals opened from windows 7 guests
Product: Red Hat Enterprise Linux 6 Reporter: Roman Hodain <rhodain>
Component: spice-gtkAssignee: Alon Levy <alevy>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, alevy, byount, cfergeau, dblechte, marcandre.lureau, mkrcmari, rhodain, ssekidde, tlavigne, yeylon
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-gtk-0.20-11.el6 Doc Type: Bug Fix
Doc Text:
Cause: Mouse over PuTTY session, with Windows guests. Consequence: The mouse pointer appears "black". Fix: Improve cursor contrast. Result: The cursor is visible on PuTTY sessions, with Windows guests.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 08:00:36 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: 1002697    

Description Roman Hodain 2013-08-19 13:30:45 UTC
Description of problem:
On PuTTY sessions the mouse pointer appears black when opened from a windows 7 guest connected via spice.

the issue is described more deeply here: 
http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/black-pointer.html

and arises also when connecting via rdesktop (see http://osdir.com/ml/network.rdesktop.user/2005-03/msg00012.html) but it does not arise when connecting via MSTSC or via freeRDP.

Workaround:

     The I-beam mouse pointer that PuTTY uses is not rendered the same in rdesktop as it is in the Windows Remote Desktop client. The workaround is to change the "Text Select" pointer on the Windows machine by going to Control Panel->Mouse->Pointers. I changed it to the beam_r.cur image, which is a beefier version of the I-beam bitmap which does render nicely in rdesktop. 


Version-Release number of selected component (if applicable):
   All versions

How reproducible:
   100%

Steps to Reproduce:
1. open putty terminal in in Win7 guest accessed cia spice

Actual results:
   Cursor is black

Expected results:
   Cursor is white

Additional info:

Comment 3 Alon Levy 2013-08-28 09:19:54 UTC
spicec shows the cursor correctly, so it isn't a server/driver problem, but a client problem. That gives me the right part of the code to look at.

Comment 4 Alon Levy 2013-08-28 12:34:09 UTC
So, I found the code in question, spicec does something it itself calls a hack. The situation is like this:

guest sets a mono cursor. A mono cursor consists of two masks: a and mask and a xor mask. The problem is what to do when both xor and and masks are on. The current behavior of spice-gtk is wrong - it ignores the xor:

http://cgit.freedesktop.org/spice/spice-gtk/tree/gtk/channel-cursor.c#n262

But spicec behavior is also wrong, it doesn't actually invert, it simply sets a different color so it acheives some contrast and avoids the putty symptom:

http://cgit.freedesktop.org/spice/spice/tree/client/x11/platform.cpp#n3549
http://cgit.freedesktop.org/spice/spice/tree/client/x11/platform.cpp#n3499

So possible solutions:
* copy the hack. easy, not very good. fixes regression.
* figure out how to do a real invert in the cursor. Marc-Andre, any idea how to do that? can we do that with X?

Alon

Comment 5 Marc-Andre Lureau 2013-08-28 12:45:48 UTC
(In reply to Alon Levy from comment #4)
> So possible solutions:
> * copy the hack. easy, not very good. fixes regression.
> * figure out how to do a real invert in the cursor. Marc-Andre, any idea how
> to do that? can we do that with X?

Apparently it is not supported by Gtk, so I would go with the hack.

Comment 7 Alon Levy 2013-08-28 15:48:53 UTC
Patches pushed upstream.

Comment 8 David Blechter 2013-08-28 19:13:01 UTC
in rhel 6.5 the problem will be solved for the rhel client. 
If you are interested in win client, then the similar bug should opens for ming-virt-viewer in rhevm

Comment 10 Bryan Yount 2013-08-29 18:06:06 UTC
(In reply to David Blechter from comment #8)
> in rhel 6.5 the problem will be solved for the rhel client. 
> If you are interested in win client, then the similar bug should opens for
> ming-virt-viewer in rhevm

Thanks David. I have opened Bug 1002697 to report this against mingw-virt-viewer.

Comment 15 Alon Levy 2013-10-21 13:05:54 UTC
Better fix this time, adding a edge around any invert only cursor to give it contrast on any background, dark or light.

Comment 16 Alon Levy 2013-10-22 12:40:34 UTC
Updating "Fixed in Version", -11 returns to using relro linkage (a security measure) and so fixes a rpmdiff test compared to 10, there is no other change.

Comment 20 errata-xmlrpc 2013-11-21 08:00:36 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