# HG changeset patch # User Ryan C. Gordon # Date 1142901322 0 # Node ID 34b9e479047eff37e44d1f9a56deb084651bea73 # Parent e7f61857028a2192d57dc8713ac6346ed2f7aa0f Keep mouse cursor state sane on focus change in Quartz driver. Fixes Bugzilla #12. diff -r e7f61857028a -r 34b9e479047e src/video/quartz/SDL_QuartzEvents.m --- a/src/video/quartz/SDL_QuartzEvents.m Mon Mar 20 08:00:07 2006 +0000 +++ b/src/video/quartz/SDL_QuartzEvents.m Tue Mar 21 00:35:22 2006 +0000 @@ -627,6 +627,12 @@ QZ_PrivateWarpCursor (this, cursor_loc.x, cursor_loc.y); QZ_ChangeGrabState (this, QZ_ENABLE_GRAB); } + else { + /* Update SDL's mouse location */ + NSPoint p; + QZ_GetMouseLocation (this, &p); + SDL_PrivateMouseMotion (0, 0, p.x, p.y); + } } static void QZ_DoDeactivate (_THIS) {