windows: Fix WIN_SetWindowAlwaysOnTop causing owner window z-order changes when child windows are created or change top-level status

- WIN_SetWindowAlwaysOnTop is always called as part of window creation (normally setting HWND_NOTOPMOST) which also set the z-order for the parent
  window when child windows are created. Since HWND_NOTOPMOST is above all non-topmost windows this had the effect of reordering but not focusing
  the parent window.
This commit is contained in:
Sam Lantinga
2025-03-12 13:06:31 -07:00
parent 50a397bb45
commit 5e951a230e

View File

@@ -1249,7 +1249,7 @@ void WIN_SetWindowResizable(SDL_VideoDevice *_this, SDL_Window *window, bool res
void WIN_SetWindowAlwaysOnTop(SDL_VideoDevice *_this, SDL_Window *window, bool on_top)
{
WIN_SetWindowPositionInternal(window, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE, SDL_WINDOWRECT_CURRENT);
WIN_SetWindowPositionInternal(window, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER, SDL_WINDOWRECT_CURRENT);
}
void WIN_RestoreWindow(SDL_VideoDevice *_this, SDL_Window *window)