[at-spi2-core] Poll direct dbus connections in the main loop
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Poll direct dbus connections in the main loop
- Date: Tue, 6 Jun 2017 15:31:51 +0000 (UTC)
commit c475b5c753df3130e29df40278fe305246a424e2
Author: Mike Gorse <mgorse suse com>
Date: Fri Jun 2 16:26:33 2017 -0500
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
atspi/atspi-misc.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 1dcc3de..89fe9e7 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]