[at-spi2-atk] Defer application registration via an idle callback
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk] Defer application registration via an idle callback
- Date: Wed, 14 Aug 2019 21:43:06 +0000 (UTC)
commit f603c8e4d9f00a9c046fbf4e02458308e9720d22
Author: Mike Gorse <mgorse alum wpi edu>
Date: Wed Aug 14 16:36:32 2019 -0500
Defer application registration via an idle callback
A python application, for instance, may initialize gtk but not enter the
main loop. It would, thus, register with the AT-SPI registry but not be
responsive to queries. Putting registration into an idle callback ensures
that, if a program never enters the main loop, then it won't register.
Fixes https://gitlab.gnome.org/GNOME/at-spi2-core/issues/16
atk-adaptor/bridge.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 3363b4e..c8ca861 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -404,8 +404,9 @@ register_reply (DBusPendingCall *pending, void *user_data)
}
static gboolean
-register_application (SpiBridge * app)
+register_application (gpointer data)
{
+ SpiBridge * app = data;
DBusMessage *message;
DBusMessageIter iter;
DBusPendingCall *pending;
@@ -441,7 +442,7 @@ register_application (SpiBridge * app)
if (message)
dbus_message_unref (message);
- return TRUE;
+ return FALSE;
}
/*---------------------------------------------------------------------------*/
@@ -1102,7 +1103,7 @@ atk_bridge_adaptor_init (gint * argc, gchar ** argv[])
/* Register this app by sending a signal out to AT-SPI registry daemon */
if (!atspi_no_register && (!root || !ATK_IS_PLUG (root)))
- register_application (spi_global_app_data);
+ g_idle_add (register_application, spi_global_app_data);
else
get_registered_event_listeners (spi_global_app_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]