dinput & [Get|Set]CursorPos conandrum

Vitaliy Margolen wine-devel at kievinfo.com
Tue Aug 8 01:58:44 CDT 2006


Monday, August 7, 2006, 1:28:45 PM, Alexandre Julliard wrote:
> Vitaliy Margolen <wine-devel at kievinfo.com> writes:

>> Current dinput has lots of problems with lots of games for number of different
>> reasons (and I'm talking about just mouse). To fix some(all) of them we need to
>> move managing of mouse warping to x11drv - only it has enough information about
>> what programs doing to the cursor. And to make it work all we really need is to
>> make GetCursorPos returned cached cursor position and not the latest from X.

> GetCursorPos really needs to query X, because there's no guarantee
> that the app is processing X events, and even if we hack around that
What do you mean here? X will always send notifies to a window (or am I wrong
here?) And in notify handler we pretty much setting the cursor_pos.

> we won't receive events from other processes anyway. Now it probably
That's the thing. We either need to send mouse notifications to all processes
(via wineserver?) or don't really need them, as long as we can synch cursor_pos
between processes.

> doesn't need to update cursor_pos asynchronously, we could wait for
> the X events to do that; but I'm not sure if that would help with your
> problem.
Not so. According to few tests native always sets cursor_pos (what ever it's
called internally - I'll call it that ;-) in SetCursorPos(). But on mouse moves
it's not being set immediately but after calling hooks and generating WM_
messages. And that's the part lots of games relay on, including native dinput.

I'm trying to get our cursor behaving the same way as native does. Otherwise
there always will be this one app that does things differently...

Vitaliy







More information about the wine-devel mailing list