SDL_SetWindowFocusable(3)
β¨ SDL_SetWindowFocusable β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual π we're talking about SDL_SetWindowFocusable today and honestly? it's giving "let me decide if this window gets to be the main character" energy π
πΈ NAME πΈ
SDL_SetWindowFocusable β set whether the window may have input focus. fr fr that's the whole vibe π¦
π SYNOPSIS π
#include <SDL3/SDL_video.h>
bool SDL_SetWindowFocusable(SDL_Window *window, bool focusable);
π FUNCTION PARAMETERS π
windowβ the window to set focusable state. like, the one you're about to vibe-check β¨focusableβtrueto allow input focus,falseto not allow input focus. no in-between, it's a yes or a no, periodt π―
π«Ά RETURN VALUE π«Ά
Returns true on success or false on failure π and if it fails? 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. not me trying to sneak it onto a worker thread π main thread only, bestie, that's the rule π₯
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on something older... it's giving nothing, she's not there yet π₯²
and that's the whole page, no cap π
sign-off cuteness: this lil masterpiece came from Simple Directmedia Layer, all cozy in SDL 3.4.18, and it's still serving SDL_SetWindowFocusable(3) energy to this very day ππ go forth and focus responsibly, queen ππΈ
π¦ 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