[orca] More hacking with GNOME Shell magnification



commit 97892d19a4c7fe3237d84f226829b67758763faf
Author: Willie Walker <william walker sun com>
Date:   Tue Nov 10 16:03:13 2009 -0500

    More hacking with GNOME Shell magnification

 src/orca/gsmag.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/gsmag.py b/src/orca/gsmag.py
index 782faa8..5b4ed95 100644
--- a/src/orca/gsmag.py
+++ b/src/orca/gsmag.py
@@ -67,7 +67,7 @@ def _setROICenter(x, y):
     - x: integer in unzoomed system coordinates representing x component
     - y: integer in unzoomed system coordinates representing y component
     """
-    _magnifier.shiftContentsTo(x, y)
+    _magnifier.shiftContentsTo(x + 1, y + 1)
 
 def _setROICursorPush(x, y, width, height, edgeMargin = 0):
     """Nudges the ROI if the caret or control is not visible.
@@ -195,10 +195,12 @@ def magnifyAccessible(event, obj, extents=None):
 
             # Be sure that the upper-left corner of the object will still
             # be visible on the screen.
+            # [[[WDW - probably should not make a getROI call each time]]]
             #
-            if width > _roiWidth:
+            (roiLeft, roiTop, roiWidth, roiHeight) = _magnifier.getROI()
+            if width > roiWidth:
                 centerX = x
-            if height > _roiHeight:
+            if height > roiHeight:
                 centerY = y
 
             _setROICenter(centerX, centerY)



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