---
name: "SDL_SetWindowFocusable"
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_SetWindowFocusable"
---

# SDL\_SetWindowFocusable(3)

Set whether the window may have input focus.

## NAME

SDL\_SetWindowFocusable - Set whether the window may have input focus.

## HEADER FILE

Defined in SDL3/SDL\_video.h

## SYNOPSIS

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

**bool SDL\_SetWindowFocusable(SDL\_Window \*window, bool focusable);**

## FUNCTION PARAMETERS

- *window*

  the window to set focusable state.

- *focusable*

  true to allow input focus, false to not allow input focus.

## RETURN VALUE

Returns true on success or false on failure; call

**SDL\_GetError** () for more information.

## THREAD SAFETY

This function should only be called on the main thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
