Mac OSX native display fullscreen toggle

I am using SDL 2.0.8 available from Homebrew on Mac OS X. I am using a NSWindow instance. On opening the window, SDL renders fine, and I am able to click the Maximize button to maximize the window to fullscreen, I am having a problem with restoring a window that has been Maximized (SDL_WINDOWEVENT_EXPOSED), because after Maximizing, the button is disabled, and can’t be clicked. Any reason for that and is there a way to fix it?

I observed a strange behavior. When I restart the application after quitting from an EXPOSED state, the window opens again in exposed state and the Maximize button is enabled. I am able to click it to Restore and Maximize again without any problems. Any help or insight shall be appreciated.

Regards

I can confirm the same issue with SDL 2.0.12. This issue only occurs when using SDL_SetWindowResizable and not when setting the SDL_WINDOW_RESIZABLE flag at window creation.

1 Like

The following PR fixes this issue: SDL_cocoawindow.m: update fullscreen toggle when SDL_SetWindowResizable called by uyjulian · Pull Request #5172 · libsdl-org/SDL · GitHub