SDL_GetGrabbedWindow(3)

πŸ’– SDL_GetGrabbedWindow(3) πŸ’–

okay so bestie, we're in the SDL3 FUNCTIONS section of the SDL3 manual, and today's main character is SDL_GetGrabbedWindow 🫢


✨ NAME ✨

SDL_GetGrabbedWindow β€” get the window that currently has an input grab enabled, no cap πŸ‘‘


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_video.h>

SDL_Window * SDL_GetGrabbedWindow(void);

like. that's it. that's the whole vibe. no arguments, she takes nothing, she just knows things πŸ’…


πŸ¦‹ RETURN VALUE πŸ¦‹

She hands you back the window if input is grabbed β€” and if it's not? You get NULL. That's the whole story, fr fr. 🌈

  • returns the window if input is grabbed
  • returns NULL otherwise

πŸŽ€ THREAD SAFETY πŸŽ€

⚠️ listen to me. listen. This function should only be called on the main thread. Don't be chaotic, don't be doing side-quest threads with this one, it's not that girl 😭

⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. If your SDL is older than that… girl. upgrade. πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

the little grabby siblings, iykyk πŸ“


mwah πŸ’‹ that's the page!! brought to you by Simple Directmedia Layer, running SDL 3.4.18, dated same as always β€” and honestly? iconic of them. periodt. 🧚✨

πŸ“¦ where this page comes from