Skip to content

Commit

Permalink
Keep mouse cursor state sane on focus change in Quartz driver.
Browse files Browse the repository at this point in the history
   Fixes Bugzilla #12.
  • Loading branch information
icculus committed Mar 21, 2006
1 parent db57a98 commit 0e2dc8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/quartz/SDL_QuartzEvents.m
Expand Up @@ -627,6 +627,12 @@ static void QZ_DoActivate (_THIS)
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) {
Expand Down

0 comments on commit 0e2dc8c

Please sign in to comment.