SDL_SetWindowModal(3)
β¨ SDL_SetWindowModal β¨
okay bestie, welcome to the SDL_SetWindowModal(3) glow-up π
this one lives in the SDL3 FUNCTIONS corner of the SDL3 manual and it's basically the on/off switch for whether a window gets to be all main character and demand everyone's attention π
πΈ NAME πΈ
SDL_SetWindowModal β toggle the state of the window as modal π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_video.h>
bool SDL_SetWindowModal(SDL_Window *window, bool modal);
π DESCRIPTION π
so here's the tea, fr fr: to turn modal status on for a window, that window has to currently be the child window of a parent. that's the vibe check. if it's not a child of a parent, then toggling modal status on is gonna fail π no cap.
π FUNCTION PARAMETERS π
windowβ the window on which to set the modal state. it's the one getting the makeover πmodalβtrueto toggle modal status on,falseto toggle it off. yes queen, it's just a lil boolean doing its thing β¨
π RETURN VALUE π
returns true on success or false on failure π«Ά and if it fails, don't just sit there spiraling β call SDL_GetError() for more information, she'll tell you what went wrong π
π THREAD SAFETY π
β οΈ this function should only be called on the main thread. literally do not try it anywhere else, bestie, that's not the move π
β AVAILABILITY β
this function is available since SDL 3.2.0 β a true icon of the 3.2.0 era π
π₯ SEE ALSO π₯
SDL_SetWindowParent(3)SDL_WINDOW_MODAL(3)
iykyk, go read those next, they're part of the same friend group π§
mwah π that's the whole page! this little love letter to your windows came from the Simple Directmedia Layer girlies, rocking SDL 3.4.18, and it's filed under SDL_SetWindowModal(3) β catch you in the next manpage, periodt π
β¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms