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