Comment 2 for bug 727290

Revision history for this message
Alan Bell (alanbell) wrote : Re: Zoom doesn't follow to text

the orca package mag.py does text tracking zoom, but using the CPU and is slow. GPU powered compiz zoom would be great.
line 898 seems to be the start of the interesting bit
http://bazaar.launchpad.net/~vcs-imports/gnome-orca/trunk/view/head:/src/orca/mag.py#L898

if the cursor is in a gnome text field then it gets text.caretOffset which is the number of characters from the start of the field
then it calls get.getCharacterExtents(offset,0) which returns the x and y position of the character at that position (along with width and height which we don't care about much)
not sure if that is returning x and y relative to the screen, or the window, or the text area, but either way it is going to be enough to work it out relative to the screen
which means that we can query those events from the compiz plugin and move the focus of the zoomed window when typing
someone else had similar ideas:
http://<email address hidden>/msg01029.html