Is it intentional that SDL_EVENT_WINDOW_RESTORED never seems to be sent after SDL_EVENT_WINDOW_MINIMIZED on macOS?

In SDL_cocoawindow.m, the windowDidDeminiaturize method appears to send SDL_EVENT_WINDOW_RESTORED.

However, I’ve observed that it gets ignored in SDL_SendWindowEvent in SDL_windowevents.c because the SDL_WINDOW_MINIMIZED flag isn’t set anymore.

The reason for the flag not being set appears to be because observeValueForKeyPath in SDL_cocoawindow.m is sending SDL_EVENT_WINDOW_SHOWN before windowDidDeminiaturize sends SDL_EVENT_WINDOW_RESTORED.

# Discourse won't let me add more links

And SDL_SendWindowEvent is clearing the SDL_WINDOW_MINIMIZED flag when SDL_EVENT_WINDOW_SHOWN is sent.

# Discourse won't let me add more links

As far as I can tell, even though SDL_cocoawindow.m has code to send SDL_EVENT_WINDOW_RESTORED, it will always be ignored by SDL_SendWindowEvent in SDL_windowevents.c. Is that a bug? Or is it intentional, and I’ve simply missed a case where SDL_EVENT_WINDOW_RESTORED is not ignored?

As it is right now, code to detect if a window has been restored from a minimized state can use SDL_EVENT_WINDOW_RESTORED on Windows (and presumably most other platforms, but I’m targeting only Windows and macOS at this time), but needs SDL_EVENT_WINDOW_SHOWN instead on macOS. I would have expected it to be the same on both platforms, but perhaps that’s a poor assumption, and I’m happy to be corrected.

Any insights would be greatly appreciated. Thank you for your time.