Calling g_application_quit() will immediately terminate the application.
You may want to have your own “quit” action and destroy all the windows bound to the GtkApplication instance. Once the last window is destroyed, the application will automatically terminate.