This flag causes any SDL operation that waits for window to be synced such as SDL_SetWindowSize/SDL_SetWindowPosition/SDL_RestoreWindow to get always stuck for a few seconds after the window has been restored from a minimised state at least once.
And by debugging, that flag is never removed from the window, thus making every SDL operation that syncs the window get stuck until timeout.
It's slightly weird why window->flags & FULLSCREEN is included in the check when such flag is only added and cleared in the case where the window is in "fullscreen space" mode, judging by the existing NSWindow notifications that seem to be responsible for the state of such flag.
This can be tested on testwm or otherwise by including this diff and then minimising the window while it is in fullscreen at least once:
This flag causes any SDL operation that waits for window to be synced such as
SDL_SetWindowSize
/SDL_SetWindowPosition
/SDL_RestoreWindow
to get always stuck for a few seconds after the window has been restored from a minimised state at least once.The flag seems to be added by this path specifically: https://github.com/libsdl-org/SDL/blob/18b7a2315c389107a433153f0a24d19d734996e8/src/video/cocoa/SDL_cocoawindow.m#L2623-L2625
And by debugging, that flag is never removed from the window, thus making every SDL operation that syncs the window get stuck until timeout.
It's slightly weird why
window->flags & FULLSCREEN
is included in the check when such flag is only added and cleared in the case where the window is in "fullscreen space" mode, judging by the existingNSWindow
notifications that seem to be responsible for the state of such flag.This can be tested on
testwm
or otherwise by including this diff and then minimising the window while it is in fullscreen at least once:Result:
https://github.com/user-attachments/assets/2a96c8d6-db0e-4213-bdb3-39cf04e35258