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 3860

Summary: Bordered Window not working on 2.0.6
Product: SDL Reporter: Byron <byron.goodman>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.6   
Hardware: x86_64   
OS: Windows 10   

Description Byron 2017-10-03 19:23:02 UTC
SDL_Window* pWindow = SDL_CreateWindow(
        TITLE, 
        0, 
        0, 
        1024, 
        768, 
        //SDL_WINDOW_FULLSCREEN | 
        SDL_WINDOW_OPENGL
        );

Does not create a bordered window, also 

SDL_SetWindowBordered(pWindow, SDL_TRUE);

has no effect.
Comment 1 Byron 2017-10-04 18:14:54 UTC
I've done more testing, and it appears the behavior is different between VC++ and MingW. What is happening is the title bar is being moved above the title displays 0 height position.

I have switched to MingW in the past few days.
Comment 2 Sam Lantinga 2017-10-07 04:47:02 UTC
I'm not able to reproduce this here.

Can you reproduce it with using testsprite2 from the latest SDL snapshot?
http://www.libsdl.org/tmp/SDL-2.0.zip

Thanks!
Comment 3 Byron 2017-10-07 16:14:18 UTC
Yes, I will test it out. 

I've been using Mingw-w64 7.1.0. I've been noticing other issues, so I'm starting to wonder if there is a compiler issue. I'll dig into this later this weekend so I can give you better details.

This problem does not exist with VC++ 2015 or 2017.
Comment 4 Sam Lantinga 2017-10-07 22:30:21 UTC
The SDL 2.0.6 release DLL was built with mingw-64, and I just tested the 32-bit DLL with testsprite2, and didn't see any problems here.
Comment 5 Byron 2017-10-08 01:09:42 UTC
I've tested what you sent and it still puts the title bar above the desktop. The borders are there, but you can't grab the top.
n
Which version of Mingw-w64 are you using? I'll test with that one as well.
Comment 6 Byron 2017-10-08 01:12:06 UTC
Let me make sure I'm describing this. 

The client rect of the window is positioned at 0,0, the title bar should be positioned at 0,0.
Comment 7 Sam Lantinga 2017-10-08 01:20:16 UTC
Oh, I see what you mean. That's actually intended behavior. You're setting the position of the client area at 0,0 in the code below.

If you want it centered, you should use SDL_WINDOWPOS_CENTERED, or if you don't care, but want the title bar visible, you should use SDL_WINDOWPOS_UNDEFINED.

You can run testsprite2 --position 0,0 to see this behavior with any SDL.dll, built with either mingw-w64 or Visual Studio.
Comment 8 Byron 2017-10-08 05:16:22 UTC
That isn't the same behavior for VC++, but okay. I'll work around it.