SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT(3)

πŸ’… SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT πŸ’…

okay bestie, gather round, we're talking about a hint from the SDL3 family β€” specifically SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT, and yes that name is a mouthful but we love her anyway 🫢. She lives in the SDL hints department, and she's the one who decides whether your X11 windows get marked as override-redirect. Iconic? Debatable. Powerful? Absolutely. πŸ‘‘


✨ NAME ✨

SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT β€” a variable that controls whether X11 windows are marked as override-redirect. that's the whole job description, no cap. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"

like, that's it. that's the whole vibe. one #include, one #define, and you're in. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, and it's kind of unhinged: if you set this hint, it might increase your framerate… at the expense of your desktop not working as expected. 🫠

the way that override-redirect windows work is that the window manager doesn't notice them at all. like, completely invisible to it. the WM is just sitting there, main character energy, having no idea your window exists. 😭

you should probably only use this for fullscreen windows, and honestly? you probably shouldn't even use it for that. but it's here if you want to try! it's giving "do it for the plot." πŸ™ˆ

the variable can be set to these values, bestie:

  • "0" β€” do not mark the window as override-redirect. (default 🌈)
  • "1" β€” mark the window as override-redirect. πŸ”₯

and important: this hint should be set before creating a window. set it after and she's simply not listening. πŸ’€

⚠️ fr fr, be careful with this one. framerate gains are a maybe, and the desktop weirdness is a real possibility. no cap.

⭐ AVAILABILITY ⭐

this hint is available since SDL 3.2.0. so if you're on anything older, she hasn't been born yet. sorry bestie. πŸŽ€


Simple Directmedia Layer made this, and this page is from SDL 3.4.18. that's the whole manual, bestie β€” go forth, set your hints, and remember: override-redirect is a lifestyle choice you probably shouldn't make. πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€πŸ’…πŸ«ΆπŸ‘‘πŸŒˆβ­πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from