[gnome-shell] magnifier: use global.get_pointer instead of gdk_window_get_pointer
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] magnifier: use global.get_pointer instead of gdk_window_get_pointer
- Date: Mon, 17 May 2010 18:56:46 +0000 (UTC)
commit 5de1a15d98f04cbefafcf9f61498adbb074eaaa8
Author: Dan Winship <danw gnome org>
Date: Mon May 17 14:44:24 2010 -0400
magnifier: use global.get_pointer instead of gdk_window_get_pointer
(qv https://bugzilla.gnome.org/show_bug.cgi?id=597292)
https://bugzilla.gnome.org/show_bug.cgi?id=618915
js/ui/magnifier.js | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index a67e539..99513b1 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -80,8 +80,7 @@ Magnifier.prototype = {
// Create the first ZoomRegion and initialize it according to the
// magnification GConf settings.
- let [objUnder, xMouse, yMouse, mask] =
- Gdk.Screen.get_default().get_root_window().get_pointer();
+ let [xMouse, yMouse, mask] = global.get_pointer();
let aZoomRegion = new ZoomRegion(this, this._cursorRoot);
this._zoomRegions.push(aZoomRegion);
let showAtLaunch = this._gConfInit(aZoomRegion);
@@ -187,8 +186,7 @@ Magnifier.prototype = {
* @return true.
*/
scrollToMousePos: function(prevCoord) {
- let [objUnder, xMouse, yMouse, mask] =
- Gdk.Screen.get_default().get_root_window().get_pointer();
+ let [xMouse, yMouse, mask] = global.get_pointer();
if (!prevCoord || prevCoord.x != xMouse || prevCoord.y != yMouse) {
let sysMouseOverAny = false;
@@ -962,8 +960,7 @@ ZoomRegion.prototype = {
* @return: Whether the system mouse pointer is over the magnified view.
*/
scrollToMousePos: function() {
- let [objUnder, xMouse, yMouse, mask] =
- Gdk.Screen.get_default().get_root_window().get_pointer();
+ let [xMouse, yMouse, mask] = global.get_pointer();
if (this._mouseTrackingMode == MouseTrackingMode.PROPORTIONAL) {
this._setROIProportional(xMouse, yMouse);
@@ -1055,8 +1052,7 @@ ZoomRegion.prototype = {
let mouseIsOver = false;
if (this.isActive()) {
if (!xMouse || !yMouse) {
- let [objUnder, x, y, mask] =
- Gdk.Screen.get_default().get_root_window().get_pointer();
+ let [x, y, mask] = global.get_pointer();
xMouse = x;
yMouse = y;
}
@@ -1174,8 +1170,7 @@ ZoomRegion.prototype = {
x = parseInt(x.toFixed(1));
y = parseInt(y.toFixed(1));
let [xCenterMagView, yCenterMagView] = this.getCenter();
- let [objUnder, xMouse, yMouse, mask] =
- Gdk.Screen.get_default().get_root_window().get_pointer();
+ let [xMouse, yMouse, mask] = global.get_pointer();
let [xMagFactor, yMagFactor] = this.getMagFactor();
let xMagMouse = xMouse * xMagFactor + x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]