GNOME Bugzilla – Bug 501426
[blocked] Orca should incorporate support for Compiz' eZoom
Last modified: 2010-04-02 21:35:51 UTC
Compiz has a plugin called "Enhanced Zoom" (eZoom). Orca should incorporate support for eZoom as an alternative to gnome-mag.
Created attachment 100160 [details] [review] patch from Kristian Lyngstøl Kristian Lyngstøl, eZoom developer, posted the following message to gnome-accessibility-devel back in August and forwarded it to me during the GNOME a11y summit in Boston in October. Then pyatspi migration happened, then we pylinted, etc. So the attached patch is mostly for documentation purposes/a starting point. -----------<begin message>----------- I've more or less finished the Enhanced Zoom plugin for Compiz, and it is able to do much of what orca already does. I was testing out the dbus interface with orca and realized that the way orca handles text-caret events is somewhat less than optimal for ezoom. With mouse events, everything works perfectly. You can use orca instead of the built in mouse panning to control ezoom over dbus. It's dead on. However, text caret events are not. Ezoom uses a rather simple interface for this: ensure_visibility. The idea is to pass it exactly what you want to make sure is visible, nothing more or less. An x1/y1 and an x2/y2 pair in screen coordinates. Ezoom will calculate how much it needs to move and in which direction by it self. You can also pass "scale: true" to make it adjust the zoom level (this is somewhat untested except the most basic technical test). The problem seems to be that orca wants to dictate the exact location of the zoomed area. Since my patch doesn't actually disable gnome-mag (it's just a quick hack), I set the magnifier location/size to 1/1/2/2. With that setting, Orca would track the upper left corner of the text cursor. This worked partially, but is not good enough. Dictating the exact location is not going to work, because Orca won't know the zoom level (nor should it have to). Of course, given my lack of experience with mag.py, I might be missing something that should be obvious. Could someone more experienced help me make a proper patch? I assume the right course of action here is to create a separate script to mag.py, though the amount of code required to make ezoom work is quite tiny, if the above issues are addressed. My current mag.py patch is at the bottom of this mail, it is a dirty hack but a decent proof of concept. As I am new with both Orca and Python, I'll take any help I can get. I also believe that much of what Orca does for gnome-mag is better suited to be handled directly by ezoom, most notably the focus tracking (who knows more about focus changes than a window manager?) and the mouse panning. The reason the mouse code should be kept inside ezoom is the up-coming input redirection, which will make it somewhat difficult for orca to know what's going on. I also tried throwing together a pyatspi script that JUST fetches the text-caret events, I used the example listed on the PythonATSPI page, but I have yet to be able to convert the data I get to proper screen coordinates, some help in that area would be much welcomed to, as I wish to have a script that can do just text-caret tracking, which is what most users miss in ezoom at the moment (and should be a fair bit easier than full Orca support). - Kristian
Another tip from Kristian, here for documentation purposes: -----------<begin message>----------- [...] you should be able to find out if ezoom is available with this code: foo = compiz_call('core/allscreens/active_plugins', 'get') if "ezoom" in foo: print "We have compiz" So that's easy enough :)
Sorry for the spam. I just found one more tip from Kristian: -----------<begin message>----------- [...] the ccsm-simple application supports going to a specific page (ie: a11y/ezoom configuration) now, so that should make it possible to add the configuration link we spoke about. ------------<end message>------------ The link in question being a way for Orca users to get to the eZoom configuration from the Orca Preferences dialog. (i.e. Orca users could choose either gnome-mag or eZoom. Choosing gnome-mag would result in what we're already doing with the Magnification page; choosing eZoom would cause the eZoom preferences/options to be presented instead.)
Obsoleting this patch. Between changes to Orca and the continued work I understand Kristian is doing, it's no longer current/applicable.
I'm afraid I'm going to close this RFE out as WONTFIX for the following reasons: * the community is moving to GNOME shell * work is being done to implement magnification within GNOME shell * there are other a11y issues in Compiz that make it a less-than-ideal window manager for Orca users * I'm the one who opened this RFE in the first place and I've not seen actual Orca+magnification users clamoring for this functionality