Quit the app when close the main window.

The notification window is hidden, this will prevent the the whole app from quit. So we need to listen the `close` event of the main window, and quit the app. Thanks for your work.