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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404253
This commit is contained in:
Sam Lantinga 2009-12-02 07:42:10 +00:00
parent e4f2557276
commit ae0f3ac642

View file

@ -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);
}