GNOME Bugzilla – Bug 334933
AccessibleEvent's source is always 'main' for 'mouse:*' events
Last modified: 2006-03-20 17:55:47 UTC
While working on a recorder for dogtail, I noticed that the mouse click events were reporting the wrong source - the desktop ('main') to be precise. I first wrote up short test script using pyspi, but after a quick googling I found at-spi/test/event-listener-test. It exhibits the same problem. If I click on an app's 'File' menu, I expect the source of the AccessibleEvent to be an Accessible with a role name of 'menu' and a name of 'File'.
"mouse" events are not GUI component events, but device events. As such, they do not originate at the widget. This is not a bug. If you want events whose source object is a GUI interface component, you must listen for state-change events.
Odd... I've never seen that event ("state-changed:") fire. I should probably file a separate bug on that, then.
RE: state-changed... you won't see it if you don't register for it (via Accessibility_Registry_registerGlobalEventListener...)
Right; I'm aware of that. I'm registering for it and not seeing it fired.
I take it you've seen at-spi/tests/event-listener-test, which registers for and prints info on these events (run it in an xterm, not a gnome-terminal)? Menu items don't emit the same events as buttons, but you should be seeing active-descendant-changed events on the containing menu. Make sure you update your gail.
Ooh, I take that back: I've just gotten state-changed to work in the last 2 minutes. Now to play with it for a while, and see if it gives me enough information...