Handle window close cleanly and show exit popup selection

This commit is contained in:
2025-11-22 11:43:20 +01:00
parent a257c5cd79
commit 838b5b1836
6 changed files with 39 additions and 15 deletions

View File

@ -398,13 +398,14 @@ bool ApplicationManager::initializeManagers() {
// Forward all window events to StateManager
if (!m_stateManager) return;
SDL_Event ev{};
ev.type = SDL_EVENT_WINDOW_RESIZED; // generic mapping; handlers can inspect inner fields
ev.type = we.type;
ev.window = we;
m_stateManager->handleEvent(ev);
});
m_inputManager->registerQuitHandler([this](){
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "[QUIT] InputManager quit handler invoked - setting running=false");
traceFile("ApplicationManager: quit handler -> m_running=false");
m_running = false;
});
}