winex11.drv: Added missing mouse position clipping. (try 2)

Vitaliy Margolen wine-devel at kievinfo.com
Wed Jan 20 09:53:56 CST 2010


Lauri Kenttä wrote:
> When the cursor position is clipped with ClipCursor, the cursor should be
> confined to that area. This patch fixes cursor position clipping in
> X11DRV_ClipCursor, X11DRV_GetCursorPos, X11DRV_SetCursorPos and
> X11DRV_send_mouse_input and makes the mouse warp to the new position if
> moved outside the clip rect.
> 
> The previous try fixed only clipping (not warping) and only in
> GetCursorPos, but the problem wasn't that small after all.
> ---
>  dlls/winex11.drv/mouse.c |   52
> ++++++++++++++++++++++++++++++++++++---------
>  1 files changed, 41 insertions(+), 11 deletions(-)
> 

You changing way too many things without a single test. Lots of those areas
you touch will break oh so many apps.

For starters write some tests and verify what you doing is correct. You
should be able to write tests for all injected messages (send_mouse_event).
If you can't make an automated test, write a visual test for the rest and
send to wine-devel. Especially pay attention to all messages sent, and order
of calling hook, sending messages, modifying values returned from
GetCursorPos(). You breaking that.

And don't try to keep pointer inside Wine's window - this won't get past AJ.

Vitaliy.



More information about the wine-devel mailing list