Mercurial > sdl-ios-xcode
changeset 1560:34b9e479047e
Keep mouse cursor state sane on focus change in Quartz driver.
Fixes Bugzilla #12.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 21 Mar 2006 00:35:22 +0000 |
parents | e7f61857028a |
children | c724c4a99759 |
files | src/video/quartz/SDL_QuartzEvents.m |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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) {