[glib] GApplication: let the main loop drain on shutdown



commit 2844f239f60cab6e549102d7cdc3cf0333076cbe
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Feb 21 10:24:23 2015 -0500

    GApplication: let the main loop drain on shutdown
    
    After ::shutdown, run the mainloop until all pending activity is
    handled, before returning from run().
    
    Among other things, this gives a chance for destroyed windows to be
    properly withdrawn from the windowing system.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744876

 gio/gapplication.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 1d2b932..51f40f1 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -2324,6 +2324,9 @@ g_application_run (GApplication  *application,
 
   g_settings_sync ();
 
+  while (g_main_context_iteration (NULL, FALSE))
+    ;
+
   return status;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]