make windows close-able by handling windows close-events