Failure in going to fullscreen on Mac

This question is specific to Mac.

After an app calls SDL_SetWindowFullscreen(), if there is a failure in going to fullscreen through NSWindowDidFailToEnterFullScreenNotification, how can the app know it?

As far as I see, there is an API SDL_GetWindowFlags(), which returns window->flags, but I want to know if this variable reflects this particular failure. Or if there are any other ways, please let me know.

Thanks.

Ping. Can anyone please help?

It appears as though the fullscreen flag might get reset on receiving the
notification, however I am not familiar with either Cocoa or SDL’s Cocoa
backend so I can’t say for sure. The source code for the notification
handler: