Generate a WM_MOUSEMOVE event when warping the mouse

JesusFreke jesusfreke at jesusfreke.com
Sat Oct 31 11:37:56 CDT 2009


On Sat, Oct 31, 2009 at 11:00 AM, Vitaliy Margolen
<wine-devel at kievinfo.com>wrote:

> JesusFreke wrote:
> > ---
> >  dlls/winex11.drv/mouse.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
> > index 60351e5..7c24c64 100644
> > --- a/dlls/winex11.drv/mouse.c
> > +++ b/dlls/winex11.drv/mouse.c
> > @@ -1004,6 +1004,7 @@ BOOL CDECL X11DRV_SetCursorPos( INT x, INT y )
> >      XFlush( display ); /* avoids bad mouse lag in games that do their
> own mouse warping */
> >      cursor_pos = pt;
> >      wine_tsx11_unlock();
> > +    queue_raw_mouse_message( WM_MOUSEMOVE, NULL, x, y, 0,
> GetCurrentTime(), 0, 0 );
> >      return TRUE;
> >  }
> >
> Can you explain why do you need this patch? What exactly is it fixing? And
> have you run any tests to verify this? I'm guessing no, because you ignored
> that Wine will generate mouse-move event when this operation comes back to
> Wine from X server.
>

Sorry, first time posting a patch. I thought I had included a introduction
to the patch with git send-email.

In any case, this is to fix a mouse issue in AION. The issue occurs when you
right-click and drag, which moves the camera. The game frequently warps the
mouse back to the center of the screen, and the camera movement is very
jittery, like it might if you had manually moved the mouse back to the
center of the screen (instantly). Another symptom is that if you begin the
right-click drag near the top or the bottom of the screen, the camera will
instantly pan down or up, like you had instantly dragged from the start
location to the center of the y-axis.

I'll be honest, I don't know if this is the correct way to fix this issue.
But with this patch, the mouse movement is working perfectly.

If you have any suggestions for a better fix, I would be happy to code it up
and test it out with Aion.

(sorry for the double-email Vitaliy - I just realized that I didn't
reply-all. And yeah, I know top posting is generally frowned upon. Sorry! :)
)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20091031/d0666eda/attachment.htm>


More information about the wine-devel mailing list