https://bugs.winehq.org/show_bug.cgi?id=42631
--- Comment #24 from Eric Culp eculperic@gmail.com --- After some more testing, the above patch appears to introduce the opposite bug sometimes (drifting to the top left). However, just clicking the mouse no longer causes any movement.
Someone more familiar to the code would have an easier time fixing this issue. There are many layers of indirection and almost no comments, so it's difficult for a newcomer to discover why the code exists, why it does what it does, and where its data comes from (doubly so if you aren't very familiar with windows apis like me).
In particular about this code, if the input MSLLHOOKSTRUCT has a point included in it (hook->pt), why does it call GetCursor to get another point? Why aren't they trivially equal? If it needs to return relative movements, can't it subtract from m_state->lX and m_state->lY?