Bug 4075 - Mouse cursor problem with Windows 7/Windows 2012
Summary: Mouse cursor problem with Windows 7/Windows 2012
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: | rdesktop (deprecated) (show other bugs)
Version: 3.2.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.2.0
Assignee: Henrik Andersson
URL:
Keywords: astrand_tester, prosaic
Depends on:
Blocks: 4552
  Show dependency treegraph
 
Reported: 2011-11-29 13:27 CET by Peter Åstrand
Modified: 2014-05-05 10:27 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2011-11-29 13:27:28 CET
Moved from bug 3065, comment #6:

Mouse cursors do not work properly against a Windows 7 system. Probably broken
for 2008r2 as well, but that machine doesn't have the fancy cursor theme.
Comment 1 Pierre Ossman cendio 2013-06-11 17:58:58 CEST
Seeing this on Windows 2012 as well. You randomly get the hand or I cursor when you should be getting the arrow. Also, the cursors are graphically wrong.
Comment 2 Henrik Andersson cendio 2014-01-14 09:40:48 CET
Verified that there are no problems with mouse cursor using 2012 R2
Comment 3 Henrik Andersson cendio 2014-01-16 15:29:20 CET
I retested against a Windows 2012 server and the mouse pointer worked out of the box with upstream compiled rdesktop and a build from ThinLinc. Testing with fedora shipped 1.8.1 it shows teh problem agaon.

Something in rdesktop upstream has fixed this problem.
Comment 4 Henrik Andersson cendio 2014-01-16 15:30:29 CET
After a svn bisect commit r1766 is the change that fixes the broken mouse pointer. However its far from related to the mouse pointer handling and havent identified why this commit fixes the problem.
Comment 5 Henrik Andersson cendio 2014-03-11 08:21:20 CET
Upstream commit r1786 introduced the problem with mouse cursors.

The changes to logon packet (size) affects the mouse cursors so there is definitely something wrong with later packets going over the protocol. We need to verify the size of logon packet and check subsequent packets to the logon packet for errors.
Comment 6 Henrik Andersson cendio 2014-03-11 09:56:54 CET
The main problem are in rdp_out_unistr, which writes unicode string and null terminate into STREAM.

MS rdp specs says that TS_INFO_PACKET string excludes null terminator and string in the TS_EXTENDED_INFO_PACKET should include the null terminator. Both uses the same encoding function rdp_out_unistr() which should take an argument and handle the two cases.
Comment 7 Henrik Andersson cendio 2014-03-12 07:01:27 CET
(In reply to comment #6)
> The main problem are in rdp_out_unistr, which writes unicode string and null
> terminate into STREAM.
> 
> MS rdp specs says that TS_INFO_PACKET string excludes null terminator and
> string in the TS_EXTENDED_INFO_PACKET should include the null terminator. Both
> uses the same encoding function rdp_out_unistr() which should take an argument
> and handle the two cases.

This is not correct. After further investigation, the logon packet is correctly constructed. This issue is related to perf flags.

Windows 2012 seeems to have cursor shadow enabled by default, were Windows 2012r2 does not. This is the actual problem and adding no_cursor_shadow flag solves this issue.
Comment 8 Henrik Andersson cendio 2014-03-12 07:24:06 CET
(In reply to comment #7)
> (In reply to comment #6)
> > The main problem are in rdp_out_unistr, which writes unicode string and null
> > terminate into STREAM.
> > 
> > MS rdp specs says that TS_INFO_PACKET string excludes null terminator and
> > string in the TS_EXTENDED_INFO_PACKET should include the null terminator. Both
> > uses the same encoding function rdp_out_unistr() which should take an argument
> > and handle the two cases.
> 
> This is not correct. After further investigation, the logon packet is correctly
> constructed. This issue is related to perf flags.
> 
> Windows 2012 seeems to have cursor shadow enabled by default, were Windows
> 2012r2 does not. This is the actual problem and adding no_cursor_shadow flag
> solves this issue.

Upstream commit r1792 adds no_cursor_shadow flag to default perf flags.
Comment 9 Henrik Andersson cendio 2014-03-12 07:28:04 CET
However the real issue is that fancy cursor themes using (alpha) are not supported by rdesktop. rdesktop hardwires all colour pointer PDU's to 24 data.
Comment 10 Henrik Andersson cendio 2014-03-12 07:40:34 CET
(In reply to comment #9)
> However the real issue is that fancy cursor themes using (alpha) are not
> supported by rdesktop. rdesktop hardwires all colour pointer PDU's to 24 data.

Created bug #5020 for adding support for mouse cursor themes using alpha.
Comment 11 Peter Åstrand cendio 2014-05-05 10:27:52 CEST
Works fine using build 4344.

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