Flush connection to make sure IBus.Exit has been sent before process exiting.
authorPeng Huang <phuang@phuang.nay.redhat.com>
Fri, 13 Feb 2009 06:10:57 +0000 (14:10 +0800)
committerPeng Huang <phuang@phuang.nay.redhat.com>
Fri, 13 Feb 2009 06:10:57 +0000 (14:10 +0800)
src/ibusbus.c

index 7b6af04..a567359 100644 (file)
@@ -639,6 +639,9 @@ ibus_bus_exit (IBusBus *bus,
 {
     g_assert (IBUS_IS_BUS (bus));
 
+    IBusBusPrivate *priv;
+    priv = IBUS_BUS_GET_PRIVATE (bus);
+    
     gboolean result;
     result = ibus_bus_call (bus,
                             IBUS_SERVICE_IBUS,
@@ -648,6 +651,8 @@ ibus_bus_exit (IBusBus *bus,
                             G_TYPE_BOOLEAN, &restart,
                             G_TYPE_INVALID,
                             G_TYPE_INVALID);
+    ibus_connection_flush (priv->connection);
+    
     return result;
 }