From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/mouse.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 9d25b71c992..f6386918c09 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1693,19 +1693,17 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) values++; }
- input->mi.dx = round( x->value ); - input->mi.dy = round( y->value ); - - TRACE( "event %f,%f value %f,%f input %d,%d\n", x_value, y_value, x->value, y->value, - (int)input->mi.dx, (int)input->mi.dy ); - - x->value -= input->mi.dx; - y->value -= input->mi.dy; - - if (!input->mi.dx && !input->mi.dy) + if (!(input->mi.dx = round( x->value )) && !(input->mi.dy = round( y->value ))) { - TRACE( "accumulating motion\n" ); - return FALSE; + TRACE( "event %f,%f value %f,%f, accumulating motion\n", x_value, y_value, x->value, y->value ); + input->mi.dwFlags &= ~MOUSEEVENTF_MOVE; + } + else + { + TRACE( "event %f,%f value %f,%f, input %d,%d\n", x_value, y_value, x->value, y->value, + (int)input->mi.dx, (int)input->mi.dy ); + x->value -= input->mi.dx; + y->value -= input->mi.dy; }
return TRUE; @@ -1733,6 +1731,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) input.mi.dx = 0; input.mi.dy = 0; if (!map_raw_event_coords( event, &input )) return FALSE; + if (!(input.mi.dwFlags & MOUSEEVENTF_MOVE)) return FALSE;
NtUserSendHardwareInput( 0, 0, &input, 0 ); return TRUE;