Terminate application on window close.