SDL_HINT_VIDEO_X11_NET_WM_PING(3)

✨ NAME ✨

SDL_HINT_VIDEO_X11_NET_WM_PING β€” okay so it's a variable (a hint, bestie, one of those lil SDL hint strings) that controls whether the X11 _NET_WM_PING protocol should be supported πŸ’–


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"

Like, that's the whole thing. You pull in the header, you get the macro, the macro holds the string. Slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie β˜• β€” by default SDL will use _NET_WM_PING. That's the vibe out of the box, no cap.

But βœ‹ if your app is one of those chaotic ones that knows it will not always be able to respond to ping requests in a timely manner, you can turn it off. Why would you do that? Because otherwise the window manager starts thinking your app is hung 😭 like it's just standing there frozen with its little spinner going and the WM is like "girl are you okay" β€” turning the hint off avoids that whole situation. Iconic avoidance behaviour honestly.

The variable can be set to the following values:

  • "0" β€” Disable _NET_WM_PING.
  • "1" β€” Enable _NET_WM_PING. (default)
⚠️ Heads up babes: this hint should be set before creating a window. Before. Not after. The window's already out here living its life at that point and you can't retroactively change its whole ping personality, iykyk πŸ™ˆ

πŸ’œ AVAILABILITY πŸ’œ

This hint is available since SDL 3.2.0. So if you're on anything older... yeah no, it's giving "not for you" πŸ’€


And that's the whole page, bestie! πŸŽ€ This lil gem came to you from Simple Directmedia Layer, version SDL 3.4.18 β€” go forth and ping responsibly, mwah πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from