bus: Rewrite a11y bus management, don't fall back to session bus
authorColin Walters <walters@verbum.org>
Tue, 15 Mar 2011 21:00:35 +0000 (17:00 -0400)
committerColin Walters <walters@verbum.org>
Fri, 18 Mar 2011 16:35:16 +0000 (12:35 -0400)
commitce599c14d58a2f1728637dbcb319ef4969460006
tree1b816f3e6e1b3b5aad451e7bbea58eee5c2678ca
parentd9e8fbd5e3830bf87622ccb54178c9752201fe3e
bus: Rewrite a11y bus management, don't fall back to session bus

First of all, there should *always* be an a11y bus; if I enable
toolkit-accessibility, and apps pick that up but then libat-spi falls
back to the session bus, that's broken.

Fix this by rewriting the a11y bus launcher in C, making it a persistent
session service, and giving it a DBus API (bus name: org.a11y.Bus).  It
will start the bus process as a child dynamically; however if
toolkit-accessibility is enabled, we start it on startup.  For more
information, see the new file bus/README.

Details:

* Create a .service file so the session bus autostarts us if
  necessary
* The .desktop file is changed to use --start-immediately
* Remove the kill_accessibility_bus() hack in registryd; instead
  we chain at-spi-bus-launcher to the session bus lifecycle.
* Change at-spi bus lookup to try both the new session bus API
  and the X11 root window property.
* Create libregistry-internals.la which encapsulates a11y bus
  lookup logic, de-duplicating from atspi/ and registryd/.

https://bugzilla.gnome.org/show_bug.cgi?id=644851
14 files changed:
atspi/Makefile.am
atspi/atspi-misc.c
bus/Makefile.am
bus/README [new file with mode: 0644]
bus/accessibility.conf
bus/at-spi-bus-launcher.c [new file with mode: 0644]
bus/at-spi-dbus-bus.desktop.in
bus/at-spi-dbus-bus.in [deleted file]
bus/org.a11y.Bus.service.in [new file with mode: 0644]
configure.ac
registryd/Makefile.am
registryd/libregistry-internals.c [new file with mode: 0644]
registryd/libregistry-internals.h [new file with mode: 0644]
registryd/registry-main.c