Move the deactivate_timer() call from window_destroy() into