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
- 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