mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 23:06:03 +00:00
Don't update hidden child windows, their relative position doesn't change
This improves performance when moving a top level window that has many hidden child windows
This commit is contained in:
@@ -884,6 +884,11 @@ void WIN_ShowWindow(_THIS, SDL_Window *window)
|
||||
HWND hwnd;
|
||||
int nCmdShow;
|
||||
|
||||
if (window->parent) {
|
||||
/* Update our position in case our parent moved while we were hidden */
|
||||
WIN_SetWindowPositionInternal(window, SWP_NOCOPYBITS | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
hwnd = window->driverdata->hwnd;
|
||||
nCmdShow = SDL_GetHintBoolean(SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN, SDL_FALSE) ? SW_SHOWNA : SW_SHOW;
|
||||
style = GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
|
Reference in New Issue
Block a user