mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
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.
This commit is contained in:
@@ -3460,7 +3460,7 @@ void SDL_OnWindowHidden(SDL_Window *window)
|
|||||||
* this was initiated by the window manager due to the window being unmapped
|
* this was initiated by the window manager due to the window being unmapped
|
||||||
* when minimized.
|
* 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. */
|
/* The window is already hidden at this point, so just change the mode back if necessary. */
|
||||||
SDL_UpdateFullscreenMode(window, SDL_FALSE, SDL_FALSE);
|
SDL_UpdateFullscreenMode(window, SDL_FALSE, SDL_FALSE);
|
||||||
|
Reference in New Issue
Block a user