handle SDL_Quit events