GApplication: don't iterate further on _quit()

If someone explicitly calls g_application_quit() then don't attempt to
drain the mainloop of remaining sources.

This allows applications with 100% CPU utilisation to quit reliably.

https://bugzilla.gnome.org/show_bug.cgi?id=744876
This commit is contained in:
Ryan Lortie 2015-02-27 07:50:28 -05:00
parent eb92b4fdff
commit 0cb75bf796

View File

@ -2324,8 +2324,9 @@ g_application_run (GApplication *application,
g_settings_sync ();
while (g_main_context_iteration (NULL, FALSE))
;
if (!application->priv->must_quit_now)
while (g_main_context_iteration (NULL, FALSE))
;
return status;
}