Attempt to set up a window close notification