Re: [g-a-devel] AccessibleComponent_getAccessibleAtPoint(): doesn't work for all cases?



Hi Sam,

2009/2/11 Quiring, Sam <Sam Quiring windriver com>
Greetings,
 
Over in the Mozilla accessibility mailing list (dev-accessibility lists mozilla org) I asked how to determine the topmost object under the mouse, the object that would get the event if the user clicked?  Aaron Leventhal answered "MSAA and AT-SPI have a way to get the accessible object at a point".  With some help I eventually discovered the at-spi routine AccessibleComponent_getAccessibleAtPoint(), which has worked great until today.
 
I have a GTK window on the screen and the mouse is hovering over a Text box.  Below is a dump of part of the at-spi accessibility tree representing that area of the window.  The mouse is at (x,y) = (1060, 538).  This is inside the text object shown at the last line of the dump.
 
I call AccessibleComponent_getAccessibleAtPoint(...,1060, 538) on the "page tab list" object and it returns NULL.  Given the data in the dump, I can see how this might have happened: there are exactly 2 children of "page tab list" and neither contain (1060, 538):

I have noticed incorrect value with respect to Nautilus, when I try to get the values using AccessibleComponent_getExtents. Its the value provided by individual application, where the object is located and not the job of at-spi (I guess).

Thanks
Nagappan

 
 
child 2/2 (n:,d:,r:page tab list) Box[756,508,506,170] [actions: ] [subs: Component Selection ] (children: 2)
  child 1/2 (n:,d:,r:page tab) Box[-2147483648,-2147483648,0,0] [actions: ] [subs: Component Text ] (children: 1)
  child 2/2 (n:,d:,r:page tab) Box[756,508,0,0] [actions: ] [subs: Component Text ] (children: 1)
but if we look further, we can see that deeper descendents do contain (1060, 538), including the text box at the bottom of the dump, which is what I was looking for.
 
Is this a bug in AccessibleComponent_getAccessibleAtPoint()?  If not, is there another routine I should be calling to get the accessible object at a point?
 
-Sam
 
 
key: Box[x, y, width, height]
child 2/2 (n:,d:,r:page tab list) Box[756,508,506,170] [actions: ] [subs: Component Selection ] (children: 2)
child 2/2   - [states: enabled, sensitive, showing, visible]
  child 1/2 (n:,d:,r:page tab) Box[-2147483648,-2147483648,0,0] [actions: ] [subs: Component Text ] (children: 1)
  child 2/2 (n:,d:,r:page tab) Box[756,508,0,0] [actions: ] [subs: Component Text ] (children: 1)
    child 1/1 (n:,d:,r:filler) Box[756,508,506,170] [actions: ] [subs: Component ] (children: 2)
      child 1/2 (n:,d:,r:scroll pane) Box[762,514,494,122] [actions: ] [subs: Component ] (children: 2)
        child 1/2 (n:,d:,r:viewport) Box[762,514,476,122] [actions: ] [subs: Component ] (children: 1)
          child 1/1 (n:,d:,r:panel) Box[764,516,472,385] [actions: ] [subs: Component ] (children: 12)
            child 1/12 (n:,d:,r:panel) Box[1162,528,68,56] [actions: ] [subs: Component ] (children: 1)
            ...
            child 11/12 (n:,d:,r:panel) Box[912,528,250,25] [actions: ] [subs: Component ] (children: 1)
              child 1/1 (n:,d:,r:text) Box[912,528,250,25] [actions: activate] [subs: Action Component EditableText Text ] (children: 0)

_______________________________________________
Gnome-accessibility-devel mailing list
Gnome-accessibility-devel gnome org
http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel




--
Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com


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