Disable it. Set "Close allowed" to "no" in the window's property pallette.