summaryrefslogtreecommitdiff
path: root/atspi/atspi-event-listener.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2014-02-24 17:11:22 -0600
committerMike Gorse <mgorse@suse.com>2014-02-24 17:11:22 -0600
commit902f2cc4e7b6b158411d9e8f5af473a5bf0624b2 (patch)
treeff13602c1977d48e30af1ae3b59d2696888a0349 /atspi/atspi-event-listener.c
parent851da8186e9e1da7f4099d707a727da3e27d60b0 (diff)
downloadat-spi2-core-902f2cc4e7b6b158411d9e8f5af473a5bf0624b2.tar.gz
Don't pass empty property array to RegisterEvent
Apparently, for some reason unknown to me, it is sometimes possible for a jhbuild session to be running an at-spi2-registryd from the system directory, rather than the jhbuild install, so it is useful to be compatible with at-spi2-registryd <= 3.10. So, for now, if no properties are being requested with an event, then let's leave off the (empty) array. Also modify at-spi2-registryd to accept the old form of RegisterEvent. We may want to revert this eventually; it would be cleaner not to send two different forms of RegisterEvent.
Diffstat (limited to 'atspi/atspi-event-listener.c')
-rw-r--r--atspi/atspi-event-listener.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 3e6e73af..752d440e 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -551,12 +551,19 @@ static gboolean
notify_event_registered (EventListenerEntry *e)
{
- dbind_method_call_reentrant (_atspi_bus (), atspi_bus_registry,
- atspi_path_registry,
- atspi_interface_registry,
- "RegisterEvent",
- NULL, "sas", e->event_type,
- e->properties);
+ if (e->properties)
+ dbind_method_call_reentrant (_atspi_bus (), atspi_bus_registry,
+ atspi_path_registry,
+ atspi_interface_registry,
+ "RegisterEvent",
+ NULL, "sas", e->event_type,
+ e->properties);
+ else
+ dbind_method_call_reentrant (_atspi_bus (), atspi_bus_registry,
+ atspi_path_registry,
+ atspi_interface_registry,
+ "RegisterEvent",
+ NULL, "s", e->event_type);
return TRUE;
}