Close app when closing main window.