Exit sclang when window closes