Fix deadlock with key event listeners in our own process
authorMike Gorse <mgorse@suse.com>
Mon, 1 Jul 2013 19:35:04 +0000 (14:35 -0500)
committerMike Gorse <mgorse@suse.com>
Mon, 1 Jul 2013 19:35:04 +0000 (14:35 -0500)
commitc1914639ec6ccac0973c56c79c5a776c6323a210
treedf190e79777b0dcb3c51e507ec6c8405bd18e195
parent58d318501cf8b9432c5f224fdd3464265cc0548f
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
configure.ac