criat: If disconnected, close window when focus is lost