SDL_HINT_VID...LLOW_LIBDECOR(3)

πŸ’– SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR πŸ’–

okay bestie, gather round, because we're reading a page from the SDL3 FUNCTIONS manual and honestly? it's a short one but it's a load-bearing one. the function/man page name is SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR, yes the whole thing, yes you have to type it, no you cannot abbreviate it, sorry babe πŸ’…


🌸 NAME 🌸

SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR β€” a variable controlling whether the libdecor Wayland backend is allowed to be used. that's it. that's the whole vibe. it's a little switch that decides whether libdecor gets to come to the party or has to stay home πŸŽ€


✨ SYNOPSIS ✨

like, how do you even get to this thing? you include the header, and then the hint is literally a #define string. here's the exact sauce:

#include <SDL3/SDL_hints.h>

#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"

so the macro's value is the string "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR" β€” character for character, don't be out here editing it, it's not a suggestion it's the name πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: libdecor is used over xdg-shell when the xdg-decoration protocol is unavailable. that's the context, that's why this hint exists, no cap.

and the variable can be set to the following values:

  • "0" β€” libdecor use is disabled. it's giving "we're doing this ourselves", and honestly valid.
  • "1" β€” libdecor use is enabled. this is the default, so if you never touch this hint, this is where you're at. main character energy, default behaviour, iconic.
⚠️ okay important, listen up: this hint should be set before SDL is initialized. not after. before. if you set it late you're gonna have a bad time and SDL is not gonna wait around for you, fr fr 😭

🌈 AVAILABILITY 🌈

this hint is available since SDL 3.2.0. so if you're on anything older, it's not here yet, sorry bestie, upgrade time 🫢


and that's the whole page!! short, sweet, extremely specific, we love a niche Wayland decoration hint moment πŸ’œ

this has been a page from Simple Directmedia Layer, SDL 3.4.18, and yeah the manpage title is literally SDL_HINT_VID...LLOW_LIBDECOR(3) because even the manual page was like "bestie that name is too long, we're abbreviating" β€” anyway bye, go set your hints before init, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from