+ else if (!strcmp (interface, ATSPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER))
+ {
+ result = DBUS_HANDLER_RESULT_HANDLED;
+ if (!strcmp (member, "KeystrokeListenerRegistered"))
+ handle_device_listener_registered (bus, message, user_data);
+ else if (!strcmp (member, "DeviceListenerRegistered"))
+ handle_device_listener_registered (bus, message, user_data);
+ else
+ result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ }
+
+ if (!g_strcmp0(interface, DBUS_INTERFACE_DBUS) &&
+ !g_strcmp0(member, "NameOwnerChanged"))
+ {
+ char *name, *old, *new;
+ result = DBUS_HANDLER_RESULT_HANDLED;
+ if (dbus_message_get_args (message, NULL,
+ DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_STRING, &old,
+ DBUS_TYPE_STRING, &new,
+ DBUS_TYPE_INVALID))
+ {
+ if (*old != '\0' && *new == '\0')
+ spi_atk_remove_client (old);
+ }
+ }
+