Skip to content
  • Mike Gorse's avatar
    Fix deadlock with key event listeners in our own process · c1914639
    Mike Gorse authored
    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.
    c1914639