SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR(3)
β¨ SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR β¨
okay bestie, this is a page from the SDL3 FUNCTIONS manual, and it's all about one little hint that decides who gets to draw your window decorations on Wayland. let's get into it π
π NAME π
SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR β a variable that controls whether the libdecor Wayland backend gets preferred over native decorations.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
π¦ DESCRIPTION π¦
so the tea is: when this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is available. and before you come for me β note that, by default, libdecor will use xdg-decoration itself if it's available. so it's giving layers on layers, iykyk π
the variable can be set to these values:
"0"β libdecor is enabled only if server-side decorations are unavailable. (this is the default, bestie π)"1"β libdecor is always enabled if available. periodt.
π heads up: this hint should be set before SDL is initialized. like, before. don't be late to the party fr fr.
π AVAILABILITY π
this hint has been available since SDL 3.2.0. iconic behavior, honestly.
and that's the whole page, bestie π«Ά go forth and decorate your windows with main character energy π
π§ source: Simple Directmedia Layer, version SDL 3.4.18. mwah, slay, bye π β¨
π¦ 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