---
name: "SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE"
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_HINT_QUIT_ON_LAST_WINDOW_CLOSE"
---

# SDL\_HINT\_QUIT\_ON\_LAST\_WINDOW\_CLOSE(3)

A variable that decides whether to send SDL\_EVENT\_QUIT when closing the last window.

## NAME

SDL\_HINT\_QUIT\_ON\_LAST\_WINDOW\_CLOSE - A variable that decides whether to send  **SDL\_EVENT\_QUIT**\
  when closing the last window.

## HEADER FILE

Defined in SDL3/SDL\_hints.h

## SYNOPSIS

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

**#define SDL\_HINT\_QUIT\_ON\_LAST\_WINDOW\_CLOSE** *SDL\_QUIT\_ON\_LAST\_WINDOW\_CLOSE"*

## DESCRIPTION

The variable can be set to the following values:

• "0": SDL will not send an  **SDL\_EVENT\_QUIT**\
  event when the\
   last window is requesting to close. Note that in this case, there are\
   still other legitimate reasons one might get an

**SDL\_EVENT\_QUIT**\
  event: choosing "Quit" from the macOS\
   menu bar, sending a SIGINT (ctrl-c) on Unix, etc.

• "1": SDL will send a quit event when the last window is requesting to\
   close. (default)

If there is at least one active system tray icon,

**SDL\_EVENT\_QUIT**\
  will instead be sent when both the last window will be closed and the last tray icon will be destroyed.

This hint can be set anytime.

## AVAILABILITY

This hint is available since SDL 3.2.0.
