[g-a-devel] Interesting event reporting



Greetings,
 
I am trying to determine if our accessibility app can listen for a set of events and, when the user clicks the mouse on an object, figure out what object was clicked.  I've been examining different sequences of events that are delivered to our accessibility app.  I haven't been able to find definitive documentation on this, so I run experiments and log the events and study those sequences.  The situation I'm currently examining has these initial conditions:
 
1. a GUI app (Hello World plus) is comletely visible, but is not active.
    - the GUI app contains a pushbutton that will bring up a dialog (Information(alert))
    - When the GUI app becomes active, the pushbutton has the focus
    - When the dialog becomes active a pushbutton with text "No" becomes active.
2. another app is active and has the focus; it is a Terminal app (user ubuntu8041...)
 
The experiment sets up the above situation then clicks just once on the pushbutton in the GUI app.  That single click causes a sequence of events to unfold that terminates with the dialog as the active window.
 
I first ran this experiment while executing an at-spi logging app that I've written.  When I clicked on the pushbutton, these events and only these events were logged:
 
TCF 40:34.041: ev window:activate (det1: 0x0, det2: 0x0) Hello World plus(frame)
TCF 40:34.060: ev window:deactivate (det1: 0x0, det2: 0x0) user ubuntu8041: ~/ldtp-1.3.0/src(frame)
TCF 40:34.061: ev window:create (det1: 0x0, det2: 0x0) Information(alert)
TCF 40:34.188: ev window:deactivate (det1: 0x0, det2: 0x0) Hello World plus(frame)
TCF 40:34.189: ev window:activate (det1: 0x0, det2: 0x0) Information(alert)
TCF 40:34.202: ev focus: (det1: 0x0, det2: 0x0) No(push button.=nothing=) Mouse (934, 602) not in Focus <(x:1002..1086, y:616..651) (w:85, h:36)>
No mouse events were reported.  I was expecting mouse:button:1p and mouse:button:1r, but they never showed up.  I reran the experiment a few times and got the same result.
 
I decided to run Accerciser while running this experiment.  I set it up to monitor the same events for which my logging app is listening.  Wither Accerciser running, every time I ran the experiment the expected mouse events appear, both in my logging app and in accerciser.  This caused me to suspect that accerciser is setting something up that my logging app is not.
 
So next I stopped my logging app and just run the experiment with Accerciser monitoring events.  When Accerciser is the only app listening for at-spi events, it gets the same result as I originally observed: no mouse events are reported.
 
Now that I've written all this, it seems to me like this could be a bug in at-spi -- I clicked on the pushbutton, the associated events should be delivered to all listeners shouldn't they?  The pushbutton is clearly getting the "clicked" signal, because it is that signal handler that brings up the alert dialog.
 
-Sam
 
Here's the Accerciser log showing that it doesn't get any mouse events either:
 
focus:(0, 0, None)   -- clicked on the Terminal app to make it active and set up the experiment
    source: [terminal | Terminal]
    application: [application | gnome-terminal]
window:activate(0, 0, Hello World plus)   -- click on pushbutton
    source: [frame | Hello World plus]
    application: [application | gtk_hello]
window:deactivate(0, 0, user ubuntu8041: ~/ldtp-1.3.0/src)
    source: [frame | user ubuntu8041: ~/ldtp-1.3.0/src]
    application: [application | gnome-terminal]
window:create(0, 0, Information)
    source: [alert | Information]
    application: [application | gtk_hello]
window:deactivate(0, 0, Hello World plus)
    source: [frame | Hello World plus]
    application: [application | gtk_hello]
window:activate(0, 0, Information)
    source: [alert | Information]
    application: [application | gtk_hello]
focus:(0, 0, None)
    source: [push button | No]
    application: [application | gtk_hello]
 
Here is my app's log when the mouse events are delivered (the MOUSE events are device events):
 
TCF 34:03.390: ev mouse:button:1p (x: 1081, y: 610) main(unknown)
TCF 34:03.385: ev MOUSE key: 1(), keycode: 1, type: button-pressed, modifiers 0x100 xxx:1081 yyy:610 []
TCF 34:03.392: ev window:deactivate (det1: 0x0, det2: 0x0) user ubuntu8041: ~/ldtp-1.3.0/src(frame)
TCF 34:03.443: ev window:activate (det1: 0x0, det2: 0x0) Hello World plus(frame)
TCF 34:03.531: ev MOUSE key: 1(), keycode: 1, type: button-released, modifiers 0x0 xxx:1081 yyy:610 []
TCF 34:03.539: ev mouse:button:1r (x: 1081, y: 610) main(unknown)
TCF 34:03.615: ev window:create (det1: 0x0, det2: 0x0) Information(alert)
TCF 34:03.635: ev window:deactivate (det1: 0x0, det2: 0x0) Hello World plus(frame)
TCF 34:03.638: ev window:activate (det1: 0x0, det2: 0x0) Information(alert)
TCF 34:03.660: ev focus: (det1: 0x0, det2: 0x0) No(push button.=nothing=) Mouse (1081, 610) not in Focus <(x:1186..1270, y:626..661) (w:85, h:36)>
Here is Accerciser's log when the mouse events are delivered.
 
 
window:deactivate(0, 0, user ubuntu8041: ~/ldtp-1.3.0/src)
    source: [frame | user ubuntu8041: ~/ldtp-1.3.0/src]
    application: [application | gnome-terminal]
mouse:button:1p(1081, 610, None)
    source: [unknown | main]
    application: None
window:activate(0, 0, Hello World plus)
    source: [frame | Hello World plus]
    application: [application | gtk_hello]
mouse:button:1r(1081, 610, None)
    source: [unknown | main]
    application: None
window:create(0, 0, Information)
    source: [alert | Information]
    application: [application | gtk_hello]
window:deactivate(0, 0, Hello World plus)
    source: [frame | Hello World plus]
    application: [application | gtk_hello]
window:activate(0, 0, Information)
    source: [alert | Information]
    application: [application | gtk_hello]
focus:(0, 0, None)
    source: [push button | No]
    application: [application | gtk_hello]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]