[gnome-shell] Magnifier: take x,y from center of focused widget



commit 583d2cb4e468d26bfdb2b8f8fb201370379c6ec4
Author: Magdalen Berns <m berns thismagpie com>
Date:   Wed Feb 5 18:21:42 2014 +0000

    Magnifier: take x,y from center of focused widget
    
    bug https://bugzilla.gnome.org/show_bug.cgi?id=720951

 js/ui/magnifier.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 5c79acb..2a6ac38 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -736,7 +736,8 @@ const ZoomRegion = new Lang.Class({
         if (!component || event.detail1 != 1)
             return;
         let extents = component.get_extents(Atspi.CoordType.SCREEN);
-        [this._xFocus, this._yFocus] = [extents.x, extents.y]
+        [this._xFocus, this._yFocus] = [extents.x + (extents.width / 2),
+                                        extents.y + (extents.height / 2)];
         this._centerFromFocusPosition();
     },
 


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