mirror of https://github.com/encounter/SDL.git
Don't try to hide foreign windows when destroying the SDL window representation
Fixes https://github.com/libsdl-org/SDL/issues/5432
This commit is contained in:
parent
74680f5c4c
commit
34fd83ca06
|
@ -1770,7 +1770,9 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore video mode, etc. */
|
/* Restore video mode, etc. */
|
||||||
SDL_HideWindow(window);
|
if (!(window->flags & SDL_WINDOW_FOREIGN)) {
|
||||||
|
SDL_HideWindow(window);
|
||||||
|
}
|
||||||
|
|
||||||
/* Tear down the old native window */
|
/* Tear down the old native window */
|
||||||
if (window->surface) {
|
if (window->surface) {
|
||||||
|
@ -3099,7 +3101,9 @@ SDL_DestroyWindow(SDL_Window * window)
|
||||||
window->is_destroying = SDL_TRUE;
|
window->is_destroying = SDL_TRUE;
|
||||||
|
|
||||||
/* Restore video mode, etc. */
|
/* Restore video mode, etc. */
|
||||||
SDL_HideWindow(window);
|
if (!(window->flags & SDL_WINDOW_FOREIGN)) {
|
||||||
|
SDL_HideWindow(window);
|
||||||
|
}
|
||||||
|
|
||||||
/* Make sure this window no longer has focus */
|
/* Make sure this window no longer has focus */
|
||||||
if (SDL_GetKeyboardFocus() == window) {
|
if (SDL_GetKeyboardFocus() == window) {
|
||||||
|
|
Loading…
Reference in New Issue