# HG changeset patch # User Sam Lantinga # Date 1259739730 0 # Node ID 5ffbbfb78987b1efab822e228d9dae4db2460cc8 # Parent 42cfa69e351b82151e6179640a6317565235ce1f If we're fullscreen on a single-head system and lose focus, minimize diff -r 42cfa69e351b -r 5ffbbfb78987 src/video/SDL_video.c --- a/src/video/SDL_video.c Wed Dec 02 07:38:28 2009 +0000 +++ b/src/video/SDL_video.c Wed Dec 02 07:42:10 2009 +0000 @@ -1449,6 +1449,12 @@ { 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); }