Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't warp mouse on focus lost.
Browse files Browse the repository at this point in the history
This isn't working great, so undo it until we can fix it properly to save /
restore mouse positions.
  • Loading branch information
jorgenpt committed Apr 26, 2013
1 parent 9396c2d commit 499beb1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/video/SDL_video.c
Expand Up @@ -2074,17 +2074,10 @@ static SDL_bool ShouldMinimizeOnFocusLoss()
void
SDL_OnWindowFocusLost(SDL_Window * window)
{
SDL_Mouse *mouse = SDL_GetMouse();

if (window->gamma && _this->SetWindowGammaRamp) {
_this->SetWindowGammaRamp(_this, window, window->saved_gamma);
}

if (mouse && mouse->relative_mode) {
/* Restore the expected mouse position */
SDL_WarpMouseInWindow(window, mouse->original_x, mouse->original_y);
}

SDL_UpdateWindowGrab(window);

/* If we're fullscreen on a single-head system and lose focus, minimize */
Expand Down

0 comments on commit 499beb1

Please sign in to comment.