Saves the current window position and closes the window.
Closes the window without saving the window position.