[at-spi2-atk] Fix deadlock with key event listeners in our own process
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk] Fix deadlock with key event listeners in our own process
- Date: Mon, 1 Jul 2013 20:01:49 +0000 (UTC)
commit c1914639ec6ccac0973c56c79c5a776c6323a210
Author: Mike Gorse <mgorse suse com>
Date: Mon Jul 1 14:35:04 2013 -0500
Fix deadlock with key event listeners in our own process
If a key event was sent out and there was also a listener in the same
process, then the listener would never see the event, since the main
loop was being run in a separate context, while libatspi would defer
handling of the event, adding an idle handler into the default context.
We should call atspi_set_main_context (new function) to let libatspi
know which context to use when adding an idle callback. This was
previously hacked around by setting ATSPI_CLIENT in pyatspi and avoiding
switching main loop contexts if it was set, but this was specific to
pyatspi (ie, did not take into account direct usage of libatspi or use
directly through introspection, such as in Javascript), so this check
was removed in 2.9.3.
atk-adaptor/event.c | 1 +
configure.ac | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index dc4e3ec..8e8dd89 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -67,6 +67,7 @@ switch_main_context (GMainContext *cnx)
if (spi_global_app_data->server)
atspi_dbus_server_setup_with_g_main (spi_global_app_data->server, cnx);
atspi_dbus_connection_setup_with_g_main (spi_global_app_data->bus, cnx);
+ atspi_set_main_context (cnx);
for (list = spi_global_app_data->direct_connections; list; list = list->next)
atspi_dbus_connection_setup_with_g_main (list->data, cnx);
}
diff --git a/configure.ac b/configure.ac
index 126c839..4292a99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,7 +55,7 @@ PKG_CHECK_MODULES(ATK, [atk >= 2.7.90])
AC_SUBST(ATK_LIBS)
AC_SUBST(ATK_CFLAGS)
-PKG_CHECK_MODULES(ATSPI, [atspi-2 >= 2.9.3])
+PKG_CHECK_MODULES(ATSPI, [atspi-2 >= 2.9.4])
AC_SUBST(ATSPI_LIBS)
AC_SUBST(ATSPI_CFLAGS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]