From 1e790b20c9b44986d405fdbaaeba5ebbf319b386 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Mon, 4 Mar 2024 10:29:43 -0500 Subject: [PATCH] video: Don't overwrite all the pending flags in the OnWindowHidden handler Other flags may have been set when programmatically hiding a window, so or in the fullscreen and maximized flags to avoid accidentally clearing any others. --- src/video/SDL_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index e52e80d2a..a1fb6b3fb 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3460,7 +3460,7 @@ void SDL_OnWindowHidden(SDL_Window *window) * this was initiated by the window manager due to the window being unmapped * when minimized. */ - window->pending_flags = (window->flags & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_MAXIMIZED)); + window->pending_flags |= (window->flags & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_MAXIMIZED)); /* The window is already hidden at this point, so just change the mode back if necessary. */ SDL_UpdateFullscreenMode(window, SDL_FALSE, SDL_FALSE);