aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-11-11 22:11:03 -0600
committerTed Gould <ted@gould.cx>2010-11-11 22:11:03 -0600
commit178f821b27fd31a5059d76a9ccc0cf9ff551e35b (patch)
tree233167829a42394a560b9d97de776b12d793c123
parent8b57d12c54ec1befb09711439e40eac7ed93dbcd (diff)
downloadlibayatana-appindicator-178f821b27fd31a5059d76a9ccc0cf9ff551e35b.tar.gz
libayatana-appindicator-178f821b27fd31a5059d76a9ccc0cf9ff551e35b.tar.bz2
libayatana-appindicator-178f821b27fd31a5059d76a9ccc0cf9ff551e35b.zip
Clearing the events before unrefing
-rw-r--r--tests/test-libappindicator.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index 7a1976c..ece2df0 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -267,6 +267,13 @@ test_libappindicator_set_menu (void)
g_assert(label != NULL);
g_assert(g_strcmp0(label, "Test Label") == 0);
+ /* Interesting, eh? We need this because we send out events on the bus
+ but they don't come back until the idle is run. So we need those
+ events to clear before removing the object */
+ while (g_main_context_pending(NULL)) {
+ g_main_context_iteration(NULL, TRUE);
+ }
+
g_object_unref(G_OBJECT(ci));
return;
}