mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
Fixed multi-window test programs not quitting when windows are closed
This commit is contained in:
parent
596c0af0f3
commit
b37b94453c
2 changed files with 10 additions and 2 deletions
|
@ -2095,6 +2095,14 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_CLOSE_REQUESTED:
|
||||
{
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->window.windowID);
|
||||
if (window) {
|
||||
SDL_HideWindow(window);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SDL_EVENT_KEY_DOWN:
|
||||
{
|
||||
SDL_bool withControl = !!(event->key.mod & SDL_KMOD_CTRL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue