comparison src/video/SDL_video.c @ 3511:42cfa69e351b

On multi-display systems it's perfectly reasonable to have focus on a window on another monitor while the application is fullscreen.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 02 Dec 2009 07:38:28 +0000
parents 7931094e4c48
children 5ffbbfb78987
comparison
equal deleted inserted replaced
3510:58cbfa81317a 3511:42cfa69e351b
1433 void 1433 void
1434 SDL_OnWindowFocusGained(SDL_Window * window) 1434 SDL_OnWindowFocusGained(SDL_Window * window)
1435 { 1435 {
1436 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); 1436 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
1437 1437
1438 SDL_UpdateFullscreenMode(window, SDL_TRUE);
1439 if (display->gamma && _this->SetDisplayGammaRamp) { 1438 if (display->gamma && _this->SetDisplayGammaRamp) {
1440 _this->SetDisplayGammaRamp(_this, display, display->gamma); 1439 _this->SetDisplayGammaRamp(_this, display, display->gamma);
1441 } 1440 }
1442 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN)) 1441 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
1443 && _this->SetWindowGrab) { 1442 && _this->SetWindowGrab) {
1448 void 1447 void
1449 SDL_OnWindowFocusLost(SDL_Window * window) 1448 SDL_OnWindowFocusLost(SDL_Window * window)
1450 { 1449 {
1451 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); 1450 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
1452 1451
1453 SDL_UpdateFullscreenMode(window, SDL_FALSE);
1454 if (display->gamma && _this->SetDisplayGammaRamp) { 1452 if (display->gamma && _this->SetDisplayGammaRamp) {
1455 _this->SetDisplayGammaRamp(_this, display, display->saved_gamma); 1453 _this->SetDisplayGammaRamp(_this, display, display->saved_gamma);
1456 } 1454 }
1457 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN)) 1455 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
1458 && _this->SetWindowGrab) { 1456 && _this->SetWindowGrab) {