Set the window as a modal to a parent window.
Defined in <SDL3/SDL_video.h>
modal_window | the window that should be set modal |
parent_window | the parent window for the modal window |
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
If the window is already modal to an existing window, it will be reparented to the new owner. Setting the parent window to null unparents the modal window and removes modal status.
Setting a window as modal to a parent that is a descendent of the modal window results in undefined behavior.
This function is available since SDL 3.0.0.