From 1947ca7028ab165cc3e6cbdb0b4b7c4db68d1710 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 26 Jun 2020 20:16:43 -0400 Subject: [PATCH] video: Changed SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS to default to FALSE. Fixes Bugzilla #5106. (and probably many others, too!) --- include/SDL_hints.h | 4 +++- src/video/SDL_video.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/SDL_hints.h b/include/SDL_hints.h index f0b7e52d8..cd4d4ead3 100644 --- a/include/SDL_hints.h +++ b/include/SDL_hints.h @@ -369,7 +369,9 @@ extern "C" { #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" /** - * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true. + * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false. + * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're + * seeing if "true" causes more problems than it solves in modern times. * */ #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index dabdd8f24..f49bd0cf4 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2734,7 +2734,7 @@ ShouldMinimizeOnFocusLoss(SDL_Window * window) } #endif - return SDL_GetHintBoolean(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, SDL_TRUE); + return SDL_GetHintBoolean(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, SDL_FALSE); } void