[ekiga/ds-opal-refactoring] EkigaApp: Clean up GTK events queue on exit.



commit 9f7d94ee0d438ab8388ea48a62170e95dc02d31d
Author: Damien Sandras <dsandras seconix com>
Date:   Sun Mar 22 16:24:32 2015 +0100

    EkigaApp: Clean up GTK events queue on exit.

 lib/engine/gui/gtk-frontend/ekiga-app.cpp |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/ekiga-app.cpp b/lib/engine/gui/gtk-frontend/ekiga-app.cpp
index 5c46715..4bc2629 100644
--- a/lib/engine/gui/gtk-frontend/ekiga-app.cpp
+++ b/lib/engine/gui/gtk-frontend/ekiga-app.cpp
@@ -556,11 +556,6 @@ gm_application_shutdown (GApplication *app)
 
   gm_platform_shutdown ();
 
-#ifdef HAVE_DBUS
-  g_object_unref (self->priv->dbus_component);
-#endif
-  g_object_unref (self->priv->builder);
-
   /* Destroy all windows to make sure the UI is gone
    * and we do not block the ServiceCore from
    * destruction.
@@ -569,10 +564,17 @@ gm_application_shutdown (GApplication *app)
     GList *windows_it = g_list_first (windows);
     if (windows_it->data && GTK_IS_WIDGET (windows_it->data))
       gtk_widget_destroy (GTK_WIDGET (windows_it->data));
+    while (gtk_events_pending ())
+      gtk_main_iteration ();
   }
 
   engine_close (self->priv->core);
 
+#ifdef HAVE_DBUS
+  g_object_unref (self->priv->dbus_component);
+#endif
+  g_object_unref (self->priv->builder);
+
   delete self->priv;
   self->priv = NULL;
 


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