http://bugs.winehq.org/show_bug.cgi?id=31702
--- Comment #26 from voidcastr cephryx@gmx.net 2012-09-24 02:48:12 CDT --- As far as I can tell, "ClipCursor( NULL );" is only called when quitting the game.
Concerning WM_X11DRV_CLIP_CURSOR being sent from mouse.c with SendMessageW or SendNotifyMessageW, I made the following observations:
When moving the mouse WITHOUT pressing a button, ungrab_clipping_window() is triggered on every mouse move event, causing WM_X11DRV_CLIP_CURSOR to get spammed via SendMessageW.
Right when pressing a mouse button (and not yet moving the mouse), grab_clipping_window(RECT) is called, sending WM_X11DRV_CLIP_CURSOR with SendMessageW.
When moving the mouse with a button held down, WM_X11DRV_CLIP_CURSOR is never sent.
When releasing a mouse button, ungrab_clipping_window() sends WM_X11DRV_CLIP_CURSOR with SendMessageW. Subsequently, as expected from the comments, clip_cursor_notify(HWND, HWND) is called sending WM_X11DRV_CLIP_CURSOR with SendNotifyMessageW.
I don't know how to interpret this behavior.