SDL_HINT_MAC_BACKGROUND_APP(3)

πŸ’… SDL_HINT_MAC_BACKGROUND_APP πŸ’…

okay bestie, so this page lives in the SDL3 FUNCTIONS section of the manual, and it's all about SDL_HINT_MAC_BACKGROUND_APP β€” a variable that controls whether you force your app to become the foreground process when it launches on macOS. yes queen, we're talking window-stacking politics πŸ“


✨ NAME ✨

SDL_HINT_MAC_BACKGROUND_APP β€” a variable controlling whether to force the application to become the foreground process when launched on macOS.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"

πŸ¦‹ DESCRIPTION πŸ¦‹

so the variable can be set to the following values, and you do have to pick one of them, it's giving very choose-your-own-adventure:

  • "0" β€” the application is brought to the foreground when launched. this is the default, so if you say nothing, this is the energy you get. main character behavior, no cap πŸ‘‘
  • "1" β€” the application may remain in the background when launched. lowkey mysterious, highkey chill πŸ’€
⚠️ okay this part matters, bestie: this hint needs to be set before SDL_Init(). before. like, set it first, then init. if you do it after, it's not gonna work and you'll be sad and I'll be sad and nobody wants that 😭

🌈 AVAILABILITY 🌈

this hint is available since SDL 3.2.0. so if you're on something older, sorry babe, it's not there yet πŸ™ˆ


and that's the whole vibe, fr fr. every flag, every value, every default, exactly where it belongs β€” I would never gatekeep a manpage from you πŸ’œ

this lil page came to you from Simple Directmedia Layer, rocking SDL 3.4.18, filed under SDL_HINT_MAC_BACKGROUND_APP(3). go forth and launch responsibly, icon πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from