From: billh Date: Wed, 19 Jun 2002 18:22:49 +0000 (+0000) Subject: Bug fix for 84856, event listeners getting wrong notifications X-Git-Tag: AT_SPI2_ATK_2_12_0~1346 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=commitdiff_plain;h=f7c4f063b11da03623b0f6e2de947f008fd81bd9 Bug fix for 84856, event listeners getting wrong notifications (notified of events that matched only 'minor' string and not 'detail' string). git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@321 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index bc8e556..a956d9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2002-06-19 Bill Haneman + + * registryd/registry.c: + (impl_accessibility_registry_register_global_event_listener): + Set listener's event_type_quark to etype.minor instead of + etype.major (fix for bug 84856). + + * test/event-listener-test.c: + (report_detail_event): + Change the output string so that user/tester can tell that the + 'detail listener' was called instead of the 'generic listener'. + 2002-06-18 Bill Haneman Fixes for bugs 84900, 84908, 84897, 84898. @@ -2867,7 +2879,7 @@ * cspi/*.h: add G_BEGIN/END_DECLS -2001-22-11 Bill Haneman +2001-11-22 Bill Haneman * test/simple-at.c: Added non-preemptive keylistener for key events with no modifiers @@ -2885,7 +2897,7 @@ for non-preemptive key masks. -2001-22-11 Bill Haneman +2001-11-22 Bill Haneman * docs/reference/idl/at-spi-idl-docs.sgml: * docs/reference/idl/at-spi-idl-sections.txt: @@ -2901,7 +2913,7 @@ * docs/idl: Added .cvsignore files. -2001-21-11 Bill Haneman +2001-11-21 Bill Haneman * libspi/deviceeventcontroller.c: * libspi/keystrokelistener.c: @@ -2911,7 +2923,7 @@ event dispatching, so listeners should only receive those events that they requested :-) -2001-21-11 Bill Haneman +2001-11-21 Bill Haneman * configure.in: * docs/Makefile.am: @@ -2943,7 +2955,7 @@ * libspi/base.[ch]: add. -2001-18-11 Bill Haneman +2001-11-18 Bill Haneman * idl/Accessible.idl: * idl/Application.idl: @@ -2981,7 +2993,7 @@ Solaris build problem. -2001-20-11 Michael Meeks +2001-11-20 Michael Meeks * libspi/registry.c (impl_accessibility_registry_deregister_global_event_listener): @@ -2998,7 +3010,7 @@ * libspi/application.h: kill unused ( and whacked out ) gboolean *spi_application_set_id (AtkObject *app, long id); -2001-20-11 Michael Meeks +2001-11-20 Michael Meeks * libspi/*.[ch]: further convert to bonobo's type func macros, remove redundnant casts etc. @@ -3015,7 +3027,7 @@ * */.cvsignore: update -2001-20-11 Michael Meeks +2001-11-20 Michael Meeks * libspi/deviceeventcontroller.c (_controller_register_with_devices): use g_getenv, @@ -3030,7 +3042,7 @@ * libspi/*.[ch]: more headers, includes and over commenting. -2001-20-11 Michael Meeks +2001-11-20 Michael Meeks * libspi/*.[ch]: fixup headers, includes and over commenting. @@ -3042,7 +3054,7 @@ * libspi/libspi.h: add. -2001-19-11 Michael Meeks +2001-11-19 Michael Meeks * libspi/editabletext.c (impl_setAttributes): fix warnings. @@ -3065,7 +3077,7 @@ * libspi/accessible.c (impl_accessibility_accessible_get_relation_set): warning fixes. -2001-18-11 Bill Haneman +2001-11-18 Bill Haneman * libspi/spi_accessible.c: Added docs and C bindings for AccessibleStateSet. (No implementations yet). Documentation @@ -3130,7 +3142,7 @@ object:column-deleted object:model-changed -2001-16-11 Bill Haneman +2001-11-16 Bill Haneman * libspi/hyperlink.c,h: Fixed some broken stuff in hyperlink. @@ -3154,7 +3166,7 @@ Doc coverage now 95%. -2001-16-11 Bill Haneman +2001-11-16 Bill Haneman One last namespacing revision: * libspi/accessibleeventlistener.[ch]: @@ -3208,7 +3220,7 @@ AccessibleTable AccessibleHyperlink -2001-14-11 Bill Haneman +2001-11-14 Bill Haneman * at-bridge/bridge.c: Initial work for toolkit-level key snooper connection by bridge. @@ -3265,7 +3277,7 @@ libraries. (Incompletely tested for technical reasons, fixes may follow) -2001-13-11 Michael Meeks +2001-11-13 Michael Meeks * libspi/application.c (impl_accessibility_application_get_version), @@ -3284,14 +3296,14 @@ (impl_accessibility_accessible_get_relation_set): warning fixes & include action.h -2001-13-11 Michael Meeks +2001-11-13 Michael Meeks * *.[ch] fix bits I screwed up: s/([^ \tb(\*\&\?\",])spi_/\1/g; s/([^ \tb(\*\&\?\",])Spi/\1/g; -2001-13-11 Michael Meeks +2001-11-13 Michael Meeks * *.[ch] Namespace libspi into spi_ and Spi. @@ -3307,7 +3319,7 @@ * configure.in: build it. -2001-12-11 Bill Haneman +2001-11-12 Bill Haneman * test/keysynth-demo.c: Use a 'realize' signal-handler to set the WM properties for @@ -3397,11 +3409,11 @@ * libspi/Makefile.am (orbittypelibdir): install in orbit-2.0 -<2001-10-26 Laszlo Peter +2001-10-26 Laszlo Peter * at-bridge/Makefile.am: fix LDFLAGS. -<2001-10-09 Bill Haneman +2001-10-09 Bill Haneman * at-bridge/bridge.c: Re-worked listeners for toolkit events, now we have signal @@ -3460,20 +3472,20 @@ bonobo_object_corba_objref (bonobo_object(o)) to BONOBO_OBJREF(o), for concision and clarity. -<2001-10-13 Louise Miller +2001-10-13 Louise Miller * idl/Accessible.idl, idl/Application.idl, idl/Desktop.idl, idl/Event.idl, idl/Registry.idl Changed these files to include Bonobo_Unknown.idl instead of Bonobo.idl -<2001-09-10 Marc Mulcahy +2001-10-09 Bill Haneman * idl/Accessible.idl: Added 'isEqual (Accessible *object)' @@ -3512,7 +3524,7 @@ CORBA_unsigned_long, to allow for 32-bit characters. -<2001-10-08 Bill Haneman +2001-10-08 Bill Haneman * util/Makefile.am: * idl/Makefile.am: @@ -3574,19 +3586,19 @@ Changed the default magnifier type to be a 3x vertical splitscreen magnifier (was previously a 2x horizontal one). -<2001-10-03 Bill Haneman +2001-10-03 Bill Haneman * libspi/keystrokelistener.h: * libspi/keystrokelistener.c: Initial functional implementations of KeystrokeListener. * idl/Registry.idl: -<2001-10-05 Marc Mulcahy +2001-10-05 Marc Mulcahy Fixed string handling for NULL strings in libspi. Added spi_freeString to free strings returned by C bindings. -<2001-09-30 Bill Haneman +2001-09-30 Bill Haneman * libspi/keystrokelistener.h: * libspi/keystrokelistener.c: @@ -3617,7 +3629,7 @@ Required making 'app' static, renamed 'this_app'. Fixed broken use of bonobo_init, passing argv wrongly. -<2001-09-27 Bill Haneman +2001-09-27 Bill Haneman * util: * util/Makefile.am: @@ -3659,7 +3671,8 @@ If env variable MAGNIFIER is set, a magnifier service will be started if one does not exist. -<2001-09-25 Bill Haneman +2001-09-25 Bill Haneman + * at-bridge/bridge.c: applied patch from Marc to build and run against new glib and gtk+ (seemed like a change @@ -3672,7 +3685,8 @@ Changed "application.h" header from a 'source' to a 'dependency' of libat-bridge. -<2001-09-12 Marc Mulcahy +2001-09-12 Marc Mulcahy + * cspi/Makefile.am: Added spi-util.c. @@ -3761,7 +3775,7 @@ * libspi/hyperlink.c: Change for nAnchors attributte name change. -<2001-09-12 Marc Mulcahy +2001-09-12 Marc Mulcahy * cspi/Makefile.am: Added spi-util.c. @@ -3851,13 +3865,13 @@ Change for nAnchors attributte name change. -<2001-09-05 Marc Mulcahy +2001-09-05 Marc Mulcahy implementations-- made server implementations own AtkObject pointers rather than their respective AtkInterrface pointers to fix refcounting. AtkHyperlink is still broken. -<2001-09-04 Bill Haneman +2001-09-04 Bill Haneman * cspi/spi_accessible.c: Added method Accessible_Role_getName(), and requisite string array (role_names). @@ -3887,7 +3901,7 @@ Changed bonobo_object_release_unref to Accessibility_Accessible_unref. -<2001-09-04 Marc Mulcahy +2001-09-04 Marc Mulcahy * Added files: spi_action.c spi_editabletext.c spi_hyperlink.c spi_hypertext.c @@ -3896,7 +3910,7 @@ Implementations for C bindings to remaining accessibility interfaces. -<2001-09-04 Marc Mulcahy +2001-09-04 Marc Mulcahy * idl/Action.idl: changed return value of Action from void to boolean to @@ -3954,7 +3968,7 @@ 2001-08-21 Bill Haneman Tagged CVS repository 'EA_1_0'. - * README.EARLY_ACCESS: + * README.EARLY_ACCESS: Alphabetized acknowledgements list, and added someone. Listed some known dependencies of at-spi. @@ -4015,7 +4029,7 @@ Accessible_getName() - uppercase object type name, studlyCaps method name. - *cspi/spi.h: + * cspi/spi.h: Added gtk-doc documentation for all currently implemented methods in the C bindings API. @@ -4292,7 +4306,7 @@ 2001-07-31 Bill Haneman - * libspi/accessible.c : added support for 'description' property. + * libspi/accessible.c : added support for 'description' property. * libspi/accessible.c * libspi/desktop.c * libspi/registry.c : changed to use bonobo_object instead of bonobo_x_object @@ -4313,7 +4327,7 @@ 2001-07-28 Anders Carlsson - * libspi/accessible.c (accessible_object_finalize): Change + * libspi/accessible.c (accessible_object_finalize): Change g_free to g_object_unref since the AtkObject is a GObject. 2001-07-30 Bill Haneman diff --git a/NEWS b/NEWS index 2e8371f..e902a9a 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,8 @@ (top) +in HEAD: + +* bugfixes for: 84856 + What's new in at-spi-1.1.0: * event listener notifications are no longer oneways. diff --git a/registryd/registry.c b/registryd/registry.c index abff002..273ab43 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -358,14 +358,14 @@ impl_accessibility_registry_register_global_event_listener ( EventTypeStruct etype; GList **list; -#ifdef SPI_DEBUG +#ifdef SPI_LISTENER_DEBUG fprintf (stderr, "registering"); fprintf (stderr, "registering for events of type %s\n", event_name); #endif /* parse, check major event type and add listener accordingly */ parse_event_type (&etype, event_name); - ls->event_type_quark = etype.major; + ls->event_type_quark = etype.minor; ls->event_type_cat = etype.type_cat; list = get_listener_list (registry, etype.type_cat); diff --git a/test/event-listener-test.c b/test/event-listener-test.c index 2cf4286..d842433 100644 --- a/test/event-listener-test.c +++ b/test/event-listener-test.c @@ -64,6 +64,8 @@ main (int argc, char **argv) "object:property-change:accessible-name"); SPI_registerGlobalEventListener (generic_listener, "object:state-changed"); + SPI_registerGlobalEventListener (specific_listener, + "object:state-changed:focused"); SPI_registerGlobalEventListener (generic_listener, "object:selection-changed"); SPI_registerGlobalEventListener (generic_listener, @@ -204,7 +206,9 @@ report_event (const AccessibleEvent *event, void *user_data) void report_detail_event (const AccessibleEvent *event, void *user_data) { - fprintf (stderr, "%s\n", event->type); + char *s = Accessible_getName (event->source); + fprintf (stderr, "(detail) %s %s\n", event->type, s); + if (s) SPI_freeString (s); } void