SDL_EVENT_QUIT when no window nor tray

SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE will not fire if there are active tray icons. This impacts only applications that create tray icons, and that at least one icon outlives the last visible top-level window. SDL_EVENT_QUIT will fire when the last active tray is destroyed if there are no active windows.
This commit is contained in:
Semphris
2024-12-26 20:50:46 -05:00
committed by Sam Lantinga
parent ff139fe71b
commit 0461180e25
14 changed files with 173 additions and 5 deletions

View File

@@ -2775,6 +2775,10 @@ extern "C" {
* - "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.
*
* \since This hint is available since SDL 3.1.3.