From 0ab86947aa58be194de2a61ef51c7046f8b73fa4 Mon Sep 17 00:00:00 2001 From: darrenk Date: Mon, 12 Aug 2002 09:49:38 +0000 Subject: [PATCH] 2002-08-12 Darren Kenny * cspi/bonobo/cspi-bonobo-listener.c: (cspi_event): Don't call cspi_oject_new() because this is creating a new Accessible every single time that an event is fired. This causes ATs like at-poke to nolonger recognise the source of the event and thus ignore it. Re-use the object from the cache, ref it and then unref it after the listeners have been called. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@330 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 10 ++++++++++ cspi/bonobo/cspi-bonobo-listener.c | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d8abdfd..5da563c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-08-12 Darren Kenny + + * cspi/bonobo/cspi-bonobo-listener.c: + (cspi_event): + Don't call cspi_oject_new() because this is creating a new Accessible + every single time that an event is fired. This causes ATs like at-poke + to nolonger recognise the source of the event and thus ignore it. + Re-use the object from the cache, ref it and then unref it after the + listeners have been called. + 2002-08-06 Darren Kenny * test/event-listener-test.c: diff --git a/cspi/bonobo/cspi-bonobo-listener.c b/cspi/bonobo/cspi-bonobo-listener.c index 3a4545c..1167ffd 100644 --- a/cspi/bonobo/cspi-bonobo-listener.c +++ b/cspi/bonobo/cspi-bonobo-listener.c @@ -91,7 +91,7 @@ cspi_event (SpiEventListener *listener, GList *l; CSpiEventListener *clistener = (CSpiEventListener *) listener; AccessibleEvent aevent; - Accessible *source = cspi_object_new (event->source); + Accessible *source = cspi_object_add (cspi_dup_ref(event->source)); aevent.type = event->type; aevent.source = source; @@ -105,6 +105,8 @@ cspi_event (SpiEventListener *listener, eh->cb.event (&aevent, eh->user_data); } + + cspi_object_unref( source ); } static void -- 2.7.4