[g-a-devel] SPI_COORD_TYPE_WINDOW



Greetings,
 
When I call AccessibleComponent_getExtents with SPI_COORD_TYPE_WINDOW, some of the windows return a negative x and y coordinate, typically (x, y) = (-5, -24).  I'm comparing these values to what I get back from XGetWindowAttributes() for the same window.  X returns (5, 24).
 
When the x and y coordinates are negative, the accessible width is 10 more than X's width and the accessible's height is 29 more than X's height.  I retrieved the _NET_FRAME_EXTENTS of the X window and I get these values:
 
left: 5
right: 5
top: 5
bottom: 24
 
Subtracting X's (left + right) from the accessible width yields the X windows's width.
Subtracting (top + bottom) from the accessible height yields the X window's height.
 
For all the windows I've tested so far (a total of 5), I get this relationship:
 
If the accessible (x, y) coordinates are positive, then the (x,y) and (width, height) of the accessible window will match the corresponding values for the corresponding X window.
 
if the accessible (x, y) coordinates are negative, then make these transformations:
 
   new-x =  -x
   new-y =  -y
 
   new-width = width - (left + right)
   new-height = height - (top + bottom)
 
then (new-x, new-y) matches the X window (x, y) and (new-width, new-height) = the X window (width, height).
 
Do these relationships always hold?  If so, Is this documented somewhere?
 
Thanks.
 
-Sam


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