Module: wine Branch: master Commit: d1f5c13162d15873b2b51b28cfb56035f0890183 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d1f5c13162d15873b2b51b28cf...
Author: Alexandre Julliard julliard@winehq.org Date: Mon May 16 14:34:10 2011 +0200
winex11: Filter out motion events resulting from setting the clip window.
---
dlls/winex11.drv/mouse.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 188e36f..8456d67 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -404,6 +404,12 @@ static BOOL grab_clipping_window( const RECT *clip, BOOL only_with_xinput ) clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, clip->right - clip->left, clip->bottom - clip->top ); XMapWindow( data->display, clip_window ); + + /* if the rectangle is shrinking we may get a pointer warp */ + if (msg_hwnd || clip->left > clip_rect.left || clip->top > clip_rect.top || + clip->right < clip_rect.right || clip->bottom < clip_rect.bottom) + data->warp_serial = NextRequest( data->display ); + if (!XGrabPointer( data->display, clip_window, False, PointerMotionMask | ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime ))