Exit process when window closes.