Pass on cancel event to the window shutdown handler