This causes an issue when I try to change the style mask. In my case, I was trying to add NSWindowStyleMaskFullSizeContentView manually by extracting the NSWindow*, along with setting titlebarAppearsTransparent to remove the title bar, which is a nice visual touch when playing games in windowed mode.
My proposed solution is to save the styleMask before the window is about to enter full screen and then restore the value when it leaves full screen again, but I'm sure it's not the only one.
Currently, SDL on macOS completely overwrites the
styleMask
on theNSWindow
when the window enters and is restored from full screen.https://github.com/libsdl-org/SDL/blob/08d5c1386e8eb468f0c66b5511c2d334e6ae0b22/src/video/cocoa/SDL_cocoawindow.m#L987 https://github.com/libsdl-org/SDL/blob/08d5c1386e8eb468f0c66b5511c2d334e6ae0b22/src/video/cocoa/SDL_cocoawindow.m#L1049
This causes an issue when I try to change the style mask. In my case, I was trying to add
NSWindowStyleMaskFullSizeContentView
manually by extracting theNSWindow*
, along with settingtitlebarAppearsTransparent
to remove the title bar, which is a nice visual touch when playing games in windowed mode.My proposed solution is to save the
styleMask
before the window is about to enter full screen and then restore the value when it leaves full screen again, but I'm sure it's not the only one.