SDL_HINT_VID...ON_FOCUS_LOSS(3)

πŸ’… NAME

SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS β€” the lil variable that decides whether your fullscreen windows get minimized the second they lose focus. bestie it's a whole mood controller for your desktop, no cap.


✨ SYNOPSIS

#include <SDL3/SDL_hints.h>

#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"

πŸŽ€ DESCRIPTION

okay so this variable is literally a little switch and you can set it to any of these values:

  • "0" β€” fullscreen windows will not be minimized when they lose focus. they just stay there, chillin', main character energy πŸ’…
  • "1" β€” fullscreen windows are minimized when they lose focus. gone. poof. minimized. 😭
  • "auto" β€” fullscreen windows get minimized when they lose focus if they use exclusive fullscreen modes, so that the desktop video mode gets restored. ✨ (this one's the default, iykyk)
this hint can be set anytime. whenever. whenever you want. periodt. 🫢

🌈 AVAILABILITY

this hint has been around since SDL 3.2.0, so she's not new-new but she's still iconic. πŸ‘‘


that's the whole page bestie!! this gorgeous little manual comes to you straight from Simple Directmedia Layer, SDL 3.4.18 β€” go forth and minimize (or don't) πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from