Only save the pending flags we will restore when hiding a window

Fixes https://github.com/libsdl-org/SDL/issues/11564
This commit is contained in:
Sam Lantinga 2024-12-23 16:53:23 -08:00
parent 969f03d9f0
commit 5a2eb60389

View file

@ -3205,7 +3205,8 @@ bool SDL_HideWindow(SDL_Window *window)
}
// Store the flags for restoration later.
window->pending_flags = window->flags;
const SDL_WindowFlags pending_mask = (SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_KEYBOARD_GRABBED | SDL_WINDOW_MOUSE_GRABBED);
window->pending_flags = (window->flags & pending_mask);
window->is_hiding = true;
if (_this->HideWindow) {