summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2017-06-02 16:26:33 -0500
committerMike Gorse <mgorse@suse.com>2017-06-02 16:26:33 -0500
commitc475b5c753df3130e29df40278fe305246a424e2 (patch)
tree0c5ce94d5d493a7204c05918d5a0a935890aa93a
parent504e6d0ddaf1f3e5fd1c751acc822d51dfccfbb4 (diff)
downloadat-spi2-core-c475b5c753df3130e29df40278fe305246a424e2.tar.gz
Poll direct dbus connections in the main loop
If a process was marked as hung, then we send a ping with the intention of removing it from the list of hung processes when a reply to the ping is received. However, we weren't necessarily polling the connection, so we wouldn't see the reply to the ping, meaning that the process could be marked as hung indefinitely. https://bugzilla.mozilla.org/show_bug.cgi?id=789038
-rw-r--r--atspi/atspi-misc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 1dcc3dea..89fe9e75 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -198,6 +198,7 @@ handle_get_bus_address (DBusPendingCall *pending, void *user_data)
dbus_connection_unref (app->bus);
}
app->bus = bus;
+ atspi_dbus_connection_setup_with_g_main(bus, g_main_context_default());
}
else
{
@@ -1019,7 +1020,6 @@ static GSList *hung_processes;
static void
remove_hung_process (DBusPendingCall *pending, void *data)
{
-
hung_processes = g_slist_remove (hung_processes, data);
g_free (data);
dbus_pending_call_unref (pending);
@@ -1676,6 +1676,17 @@ atspi_set_main_context (GMainContext *cnx)
}
atspi_main_context = cnx;
atspi_dbus_connection_setup_with_g_main (atspi_get_a11y_bus (), cnx);
+
+ if (desktop)
+ {
+ gint i;
+ for (i = desktop->children->len - 1; i >= 0; i--)
+ {
+ AtspiAccessible *child = g_ptr_array_index (desktop->children, i);
+ if (child->parent.app && child->parent.app->bus)
+ atspi_dbus_connection_setup_with_g_main (child->parent.app->bus, cnx);
+ }
+ }
}
#ifdef DEBUG_REF_COUNTS