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 4420

Summary: OpenGL rendering issues when toggling window border
Product: SDL Reporter: magr
Component: videoAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.9   
Hardware: x86_64   
OS: Windows 7   

Description magr 2018-12-10 06:29:11 UTC
When SDL is used with OpenGL for rendering, turning off the window border with SDL_SetWindowBordered() causes the render output to be shifted down within the window area. 

The window itself seems to stay in the initial position, with only the window border disappearing as expected, but the contents within the window are offset by an amount that appears to be equal to the height of the now-hidden title bar. Occasionally when selecting the application window in the task bar, the title bar text will appear again, but drawn *within* the window itself (with the text changing color when gaining/losing focus as usual).

Run the testgl2 example and press Ctrl+B to reproduce. This issue is not seen when running a non-OpenGL example (testdraw2, testsprite2 etc).

Switching to a basic Windows theme (ie. non-Aero) avoids the problem.