src/video/cocoa/SDL_cocoawindow.m
changeset 7271 963d2ba35cfe
parent 7270 76df5476a6ce
child 7282 df78adc8ba04
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Tue Jun 04 13:53:55 2013 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Tue Jun 04 14:54:49 2013 -0700
     1.3 @@ -240,12 +240,13 @@
     1.4  - (void)windowDidBecomeKey:(NSNotification *)aNotification
     1.5  {
     1.6      SDL_Window *window = _data->window;
     1.7 +    SDL_Mouse *mouse = SDL_GetMouse();
     1.8  
     1.9      /* We're going to get keyboard events, since we're key. */
    1.10      SDL_SetKeyboardFocus(window);
    1.11  
    1.12      /* If we just gained focus we need the updated mouse position */
    1.13 -    {
    1.14 +    if (!mouse->relative_mode) {
    1.15          NSPoint point;
    1.16          int x, y;
    1.17