ESC closes window