SDL_HINT_WIN...TE_WHEN_SHOWN(3)

πŸ’– SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS manual, and lemme tell you about this lil variable that controls whether your window gets activated when SDL_ShowWindow gets called. it's giving "do I get the spotlight or nah" energy and honestly? iconic. πŸŽ€


✨ NAME ✨

SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN β€” a variable controlling whether the window is activated when the SDL_ShowWindow function is called.

like, that's it. that's the whole job. but it's a very important job. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"

so you just #include the header, and the macro is already sitting there waiting for you like a good little bestie. no cap. 🫢


πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea β˜• β€” this variable can be set to the following values:

  • "0" β€” the window is NOT activated when the SDL_ShowWindow function is called. it shows up but it does not steal focus, it's lowkey minding its own business. πŸ™ˆ
  • "1" β€” the window IS activated when the SDL_ShowWindow function is called. main character energy fr fr. πŸ‘‘ (this is the default)

and the best part? this hint can be set anytime. like, no weird timing rules, no "you had to do it before init" nonsense. set it whenever, bestie. ✨


πŸ¦‹ AVAILABILITY πŸ¦‹

this hint is available since SDL 3.2.0. so if you're on anything older, sorry babe, you're not invited to this party. 😭


reminder: this is a hint, so it's the vibe you're requesting, not a blood oath. keep your values exactly as written β€” "0" and "1" β€” and don't go inventing new ones. πŸ’–

that's the whole page, bestie! go forth and activate (or don't activate) those windows with confidence. πŸŒˆβ­πŸ“

signing off with love from the Simple Directmedia Layer crew β€” this one's from SDL 3.4.18 β€” mwah, catch you in the next manpage πŸ’…πŸ’–πŸ§š

πŸ“¦ where this page comes from