---
name: "SDL_GetWindowFromEvent"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetWindowFromEvent"
---

# SDL\_GetWindowFromEvent(3)

Get window associated with an event.

## NAME

SDL\_GetWindowFromEvent - Get window associated with an event.

## HEADER FILE

Defined in SDL3/SDL\_events.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_Window \* SDL\_GetWindowFromEvent(const SDL\_Event \*event);**

## FUNCTION PARAMETERS

- *event*

  an event containing a **windowID** .

## RETURN VALUE

( **SDL\_Window**\
  \*) Returns the associated window on success or NULL if there is none.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_PollEvent**(3)](/SDL_PollEvent/3.md), **•**(3), [**SDL\_WaitEvent**(3)](/SDL_WaitEvent/3.md), **•**(3), [**SDL\_WaitEventTimeout**(3)](/SDL_WaitEventTimeout/3.md)
