The application I'm currently working on is essentially useless if its
main window isn't present. How do I make it that the application quits
automatically once the window has been closed, as by default once the
window is closed the menu still hangs there until one chooses "Quit".