Fixes Indiana Jones and the Great Circle showing system mouse cursor along with its own one after alt-tabbing out and in.
The game hides the cursor and sets up rawinput w/RIDEV_NOLEGACY in WM_ACTIVATE handling. Then, whenever it receives WM_SETCURSORPOS it shows the cursor back. WM_SETCURSORPOS is triggered by WM_MOUSEMOVE in DefWIndowProc; WM_MOUSEMOVE is not queued with rawinput/RIDEV_NOLEGACY but prior hardware messages and system messages from set_cursor_pos are present in the queue.
That's not the case on Windows. That corresponds to the fact that Windows generates those system WM_MOUSEMOVE message "on demand", that is, when Peek or GetMessage is called (see, e. g., [1]). While Wine generates and queues those in internal messages queue in server/queue.c:set_cursor_pos(). My test confirm Windows behaviour. There are corner case specifics which my patch ignores: - If PeekMesage( PM_NOREMOVE) got the message it will be then delivered even after setting up rawinput; - Delivery of SendInput() under these conditions depends on MOUSEEVENTF_MOVE_NOCOALESCE flag (which we currently don't support at all); my patch just drops any hardware WM_MOUSEMOVE messages under these conditions (which corresponds to Windows behaviour without MOUSEEVENTF_MOVE_NOCOALESCE).
1. https://devblogs.microsoft.com/oldnewthing/20130523-00/?p=4273