Handle SDL_QUIT events