video: Preserve the flag to restore popup windows with the parent when recreating the window during renderer initialization

main
Frank Praznik 2023-03-14 16:36:41 -04:00
parent e8e2c8175c
commit 969e0842e6
1 changed files with 2 additions and 0 deletions

View File

@ -2077,7 +2077,9 @@ int SDL_RecreateWindow(SDL_Window *window, Uint32 flags)
/* Restore video mode, etc. */
if (!(window->flags & SDL_WINDOW_FOREIGN)) {
const SDL_bool restore_on_show = window->restore_on_show;
SDL_HideWindow(window);
window->restore_on_show = restore_on_show;
}
/* Tear down the old native window */