comparison src/video/quartz/SDL_QuartzWM.m @ 1207:c9ec00d3e8bc

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
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 21 Dec 2005 18:02:36 +0000
parents 54aa9aa32327
children 376665398b25
comparison
equal deleted inserted replaced
1206:aac47040c6d7 1207:c9ec00d3e8bc
229 /* Only allow warping when in foreground */ 229 /* Only allow warping when in foreground */
230 if ( ! [ NSApp isActive ] ) 230 if ( ! [ NSApp isActive ] )
231 return; 231 return;
232 232
233 /* Do the actual warp */ 233 /* Do the actual warp */
234 QZ_PrivateWarpCursor (this, x, y); 234 if (grab_state != QZ_INVISIBLE_GRAB) QZ_PrivateWarpCursor (this, x, y);
235 235
236 /* Generate the mouse moved event */ 236 /* Generate the mouse moved event */
237 SDL_PrivateMouseMotion (0, 0, x, y); 237 SDL_PrivateMouseMotion (0, 0, x, y);
238 } 238 }
239 239