Retain the X button to close the window