dinput: Drop mouse wrapping events.

Vitaliy Margolen wine-patch at kievinfo.com
Sat Jul 22 21:52:02 CDT 2006


ChangeLog:
dinput: Drop mouse wrapping events.

Apparently moving hook handlers into their own thread affected timing.
And now we receiving mouse warp event after few mouse move events. This
effectively moves mouse backwards where it was - slowing most of rapid mouse
moves.

Fixes bug 5691.

 dlls/dinput/mouse.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
-------------- next part --------------
834381e694566d2f7df9c135a618e7285392aadf
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
index 16bda15..580b59e 100644
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -438,8 +438,7 @@ static LRESULT CALLBACK dinput_mouse_hoo
 		GEN_EVENT(This->offset_array[WINE_MOUSE_Y_POSITION], hook->pt.y, hook->time, 0);
 	} else {
 	    /* Now, warp handling */
-	    if ((This->need_warp == WARP_STARTED) &&
-		(hook->pt.x == This->mapped_center.x) && (hook->pt.y == This->mapped_center.y)) {
+	    if ((hook->pt.x == This->mapped_center.x) && (hook->pt.y == This->mapped_center.y)) {
 		/* Warp has been done... */
 		This->need_warp = WARP_DONE;
 		goto end;
@@ -471,6 +470,9 @@ static LRESULT CALLBACK dinput_mouse_hoo
 	    }
 	}
 	
+        TRACE(" msg %x pt %ld %ld dl %3ld %3ld (W=%d)\n", wparam, hook->pt.x, hook->pt.y,
+              hook->pt.x - This->prevX, hook->pt.y - This->prevY, This->need_warp );
+
 	This->prevX = hook->pt.x;
 	This->prevY = hook->pt.y;
 	
@@ -483,9 +485,6 @@ static LRESULT CALLBACK dinput_mouse_hoo
 	}
     }
     
-    TRACE(" msg %x pt %ld %ld (W=%d)\n",
-          wparam, hook->pt.x, hook->pt.y, (!This->absolute) && This->need_warp );
-    
     switch(wparam) {
         case WM_LBUTTONDOWN:
 	    GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x80,


More information about the wine-patches mailing list