We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5517

Summary: Windows-specific: wrong window size after SDL_SetWindowResizable()
Product: SDL Reporter: Ivan <cooler>
Component: videoAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.14   
Hardware: x86   
OS: Windows 8   

Description Ivan 2021-01-29 10:04:27 UTC
Under Windows:
 1. Create a window without SDL_WINDOW_RESIZABLE flag 
 2. Call SDL_SetWindowResizable() to make it resizable.
 3. Try to resize it and get a SDL_WINDOWEVENT_SIZE_CHANGED with WRONG window size (width and height is decreased by 10).

This happens if no SDL_SetWindowSize() is called between 2 and 3. 
Because Windows needs to update window size via MoveWindow() when window's style (border type) is changed, otherwise it reports wrong client area.
Comment 1 Ivan 2021-01-29 10:06:46 UTC
I'd suggest to add MoveWindow() call after SetWindowLong() in WIN_SetWindowResizable() in SDL_windowswindow.c