Mouse woes and luck of interest
wine-devel at kievinfo.com
Tue Oct 17 23:32:10 CDT 2006
Vitaliy Margolen wrote:
> In short we have 3 major problems that needs to be fixed:
> 1. GetCursorPos() have to return old (cached) cursor position inside
> hook handler.
> 2. Any changes to the cursor position inside hook handler will be lost
> after all hooks are handled.
I do appreciate all the responses I got. Unfortunately this problems are
still there. Here is the code in question:
And the patch:
>From what Alexandre explained: whole read-modify-write sequence (lines
263-271) should be under one enter-leave crit_section lock. Same as they
are now. However, it is impossible to do here, because functions we call
( queue_raw_mouse_message line 283) will deadlock if we still holding
the lock (see the patch).
So we have a test that shows we have to modify cursor_pos _after_ call
to queue_raw_mouse_message(). And we have an "unbreakable" sequence
that... well needs to be broken.
What should we do? As a side note, relative movement can come from
injected event only (X delivers absolute coordinates). And AFAIK is not
guaranteed to be placed in the event queue at the right time. So are we
just making our life more complicated then it really is?
More information about the wine-devel