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

Commit

Permalink
If we're fullscreen on a single-head system and lose focus, minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 2, 2009
1 parent 86015dd commit 359a8f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -1449,6 +1449,12 @@ SDL_OnWindowFocusLost(SDL_Window * window)
{
SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);

/* If we're fullscreen on a single-head system and lose focus, minimize */
if ((window->flags & SDL_WINDOW_FULLSCREEN) &&
_this->num_displays == 1) {
SDL_MinimizeWindow(window->id);
}

if (display->gamma && _this->SetDisplayGammaRamp) {
_this->SetDisplayGammaRamp(_this, display, display->saved_gamma);
}
Expand Down

0 comments on commit 359a8f3

Please sign in to comment.