To: sdl@libsdl.org
authorRyan C. Gordon <icculus@icculus.org>
Wed, 21 Dec 2005 18:02:36 +0000
changeset 1207c9ec00d3e8bc
parent 1206 aac47040c6d7
child 1208 d90b362628ea
To: sdl@libsdl.org
From: Christian Walther <cwalther@gmx.ch>
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
     1.1 --- a/src/video/quartz/SDL_QuartzWM.m	Mon Dec 19 06:58:51 2005 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzWM.m	Wed Dec 21 18:02:36 2005 +0000
     1.3 @@ -231,7 +231,7 @@
     1.4          return;
     1.5              
     1.6      /* Do the actual warp */
     1.7 -    QZ_PrivateWarpCursor (this, x, y);
     1.8 +    if (grab_state != QZ_INVISIBLE_GRAB) QZ_PrivateWarpCursor (this, x, y);
     1.9  
    1.10      /* Generate the mouse moved event */
    1.11      SDL_PrivateMouseMotion (0, 0, x, y);