[Bug 18371] Lord of the Rings Online: mouse cursor corrupted on focus change

wine-bugs at winehq.org wine-bugs at winehq.org
Sun May 17 14:29:13 CDT 2009


--- Comment #3 from Daniel Santos <daniel.santos at pobox.com>  2009-05-17 14:29:12 ---
When the app's window is deactivated, it responsibly calls LoadCursor(NULL,
IDC_ARROW) to get the default arrow cursor and then calls SetCursor() passing
the result and saving the return value, or otherwise remembering the handle to
the previous cursor.  However, it then irresponsibly calls DestroyCursor,
passing the handle to the old cursor.  This would be fine, except that when a
mouse move event is sent to the window, it calls SetCursor() passing that old

I haven't tested this behavior on windows yet, but the current wine SetCursor
implementation fails to verify that the handle passed is valid and that it is
even a handle to an object that can be used as a cursor.  Instead, if the
handle is invalid, then it clears the cursor (same as calling SetCursor(NULL)),
this is incorrect behavior.  I'm also getting that calling SetCursor and
passing a handle to an object that is not a valid cursor can result in
undefined behavior that would not occur on windows, as the msdn docs claim the
call will fail if it isn't a handle to a cursor.

I'll post & submit a patch once I've tested this behavior further on windows. 
I'm probably also going to submit a second patch that cleans up similar
problems in other areas of user32

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list