Only restore desktop mode when hiding a window if that window was fullscreen

This commit is contained in:
Sam Lantinga 2023-02-27 15:38:48 -08:00
parent 206fa4dafb
commit fcc9deb365
1 changed files with 3 additions and 1 deletions

View File

@ -2549,7 +2549,9 @@ int SDL_HideWindow(SDL_Window *window)
} }
window->is_hiding = SDL_TRUE; window->is_hiding = SDL_TRUE;
if (window->flags & SDL_WINDOW_FULLSCREEN) {
SDL_UpdateFullscreenMode(window, SDL_FALSE); SDL_UpdateFullscreenMode(window, SDL_FALSE);
}
if (_this->HideWindow) { if (_this->HideWindow) {
_this->HideWindow(_this, window); _this->HideWindow(_this, window);