Don't warp mouse on focus lost.
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Thu, 25 Apr 2013 18:40:31 -0700
changeset 7112a1a723edea64
parent 7111 f4ae9f1233df
child 7113 7b4b596b3cfb
Don't warp mouse on focus lost.

This isn't working great, so undo it until we can fix it properly to save /
restore mouse positions.
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Thu Apr 25 18:05:08 2013 -0400
     1.2 +++ b/src/video/SDL_video.c	Thu Apr 25 18:40:31 2013 -0700
     1.3 @@ -2074,17 +2074,10 @@
     1.4  void
     1.5  SDL_OnWindowFocusLost(SDL_Window * window)
     1.6  {
     1.7 -    SDL_Mouse *mouse = SDL_GetMouse();
     1.8 -
     1.9      if (window->gamma && _this->SetWindowGammaRamp) {
    1.10          _this->SetWindowGammaRamp(_this, window, window->saved_gamma);
    1.11      }
    1.12  
    1.13 -    if (mouse && mouse->relative_mode) {
    1.14 -        /* Restore the expected mouse position */
    1.15 -        SDL_WarpMouseInWindow(window, mouse->original_x, mouse->original_y);
    1.16 -    }
    1.17 -
    1.18      SDL_UpdateWindowGrab(window);
    1.19  
    1.20      /* If we're fullscreen on a single-head system and lose focus, minimize */