From e212644759c0b64c6d0ca54f1f312635e26a4bed Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 21 Dec 2005 18:02:36 +0000 Subject: [PATCH] To: sdl@libsdl.org From: Christian Walther Date: Wed, 21 Dec 2005 13:39:39 +0100 Subject: [SDL] Another mouse bug patch for Mac OS X Oh my, yet another change in the quartz mouse handling code! :) The attached patch fixes the following bug: Calling SDL_WarpMouse() while the cursor is invisible and grabbed should only update SDL's internal mouse location, not try to warp the system cursor (which is not at that location, but fixed in the middle of the window). Otherwise, the next mouse motion event is wrong. Please apply. Thanks Christian --- src/video/quartz/SDL_QuartzWM.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/quartz/SDL_QuartzWM.m b/src/video/quartz/SDL_QuartzWM.m index 00637a0a6..fab833614 100644 --- a/src/video/quartz/SDL_QuartzWM.m +++ b/src/video/quartz/SDL_QuartzWM.m @@ -231,7 +231,7 @@ void QZ_WarpWMCursor (_THIS, Uint16 x, Uint16 y) { return; /* Do the actual warp */ - QZ_PrivateWarpCursor (this, x, y); + if (grab_state != QZ_INVISIBLE_GRAB) QZ_PrivateWarpCursor (this, x, y); /* Generate the mouse moved event */ SDL_PrivateMouseMotion (0, 0, x, y);