Sometimes one can click the X accidentally when trying to move the window etc. Please pop up a Save/Quit/Cancel dialog or something.