comparison src/video/SDL_video.c @ 3512:5ffbbfb78987

If we're fullscreen on a single-head system and lose focus, minimize
author Sam Lantinga <slouken@libsdl.org>
date Wed, 02 Dec 2009 07:42:10 +0000
parents 42cfa69e351b
children 72e70a8c30d5
comparison
equal deleted inserted replaced
3511:42cfa69e351b 3512:5ffbbfb78987
1447 void 1447 void
1448 SDL_OnWindowFocusLost(SDL_Window * window) 1448 SDL_OnWindowFocusLost(SDL_Window * window)
1449 { 1449 {
1450 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); 1450 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
1451 1451
1452 /* If we're fullscreen on a single-head system and lose focus, minimize */
1453 if ((window->flags & SDL_WINDOW_FULLSCREEN) &&
1454 _this->num_displays == 1) {
1455 SDL_MinimizeWindow(window->id);
1456 }
1457
1452 if (display->gamma && _this->SetDisplayGammaRamp) { 1458 if (display->gamma && _this->SetDisplayGammaRamp) {
1453 _this->SetDisplayGammaRamp(_this, display, display->saved_gamma); 1459 _this->SetDisplayGammaRamp(_this, display, display->saved_gamma);
1454 } 1460 }
1455 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN)) 1461 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
1456 && _this->SetWindowGrab) { 1462 && _this->SetWindowGrab) {