SDL_HINT_X11_WINDOW_TYPE(3)

✨ NAME ✨

SDL_HINT_X11_WINDOW_TYPE β€” bestie, it's a variable that says what type of X11 window you want. that's it, that's the vibe πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_hints.h>

#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"

yes the macro name and the string are lowkey different, don't @ me, that's just how it is 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

ok so when you call SDL_CreateWindow, SDL is out here talking to your window manager using the _NET_WM_WINDOW_TYPE X11 property β€” basically it's like "hey queen, here's the kind of window I'm making, hope that's slay" πŸ’–

If you specified stuff like SDL_WINDOW_TOOLTIP or SDL_WINDOW_POPUP_MENU, etc, that property might already get set to various things. makes sense, those windows have main character energy of their own.

But for "normal" windows that haven't set a specific type? that's exactly where this hint comes in, and it lets you specify a custom type. iconic, honestly.

for example β€” a dock window might set this to "_NET_WM_WINDOW_TYPE_DOCK". see? giving dock. 🚒✨

⚠️ the way that you need to set this hint before creating a window β€” like, set it first, THEN create. order matters bestie, no cap.

🌈 AVAILABILITY 🌈

this hint has been available since SDL 3.2.0. so if you're on something older… girl. upgrade. 😭


ok that's the whole page, you ate that πŸ“πŸ’œ β€” this has been Simple Directmedia Layer, running SDL 3.4.18, and it's literally in the SDL3 FUNCTIONS manual, periodt. go forth and type your windows correctly, i'm obsessed with you πŸŽ€βœ¨

πŸ“¦ where this page comes from