[glib] GApplication: don't iterate further on _quit()
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GApplication: don't iterate further on _quit()
- Date: Mon, 2 Mar 2015 16:55:49 +0000 (UTC)
commit 0cb75bf796a3d8d2918509d8e370853a72f3e673
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Feb 27 07:50:28 2015 -0500
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
gio/gapplication.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 1fe12e9..c72ff53 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]