If you click somewhere inside a window and drag mouse ( e.g. trying to select a text ) , then release click outside of the window , it will close.