[gnome-shell] boxpointer: fix multi monitor support
- From: Maxim Ermilov <mermilov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] boxpointer: fix multi monitor support
- Date: Tue, 1 Feb 2011 23:39:33 +0000 (UTC)
commit 5b95ccae5ff9d9f1430256ca320f42dfb72c1999
Author: Maxim Ermilov <zaspire rambler ru>
Date: Wed Feb 2 02:37:43 2011 +0300
boxpointer: fix multi monitor support
https://bugzilla.gnome.org/show_bug.cgi?id=641195
js/ui/boxpointer.js | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js
index 2c33362..5479a27 100644
--- a/js/ui/boxpointer.js
+++ b/js/ui/boxpointer.js
@@ -414,16 +414,15 @@ BoxPointer.prototype = {
if (sourceCenterX < margin) {
// Not enough space to the top
this._arrowCorner = (this._arrowSide == St.Side.TOP) ? St.Corner.TOPLEFT : St.Corner.BOTTOMLEFT;
- resX = 10;
- } else if (sourceCenterX > (primary.width - margin)) {
+ resX = primary.x + 10;
+ } else if (sourceCenterX > (primary.x + primary.width - margin)) {
// Not enough space to the botom
this._arrowCorner = (this._arrowSide == St.Side.TOP) ? St.Corner.TOPRIGHT : St.Corner.BOTTOMRIGHT;
- resX = primary.width - (10 + natWidth);
+ resX = primary.x + primary.width - (10 + natWidth);
}
- resX = Math.max(resX, 10);
- resX = Math.min(resX, primary.width - (10 + natWidth));
-
+ resX = Math.max(resX, primary.x + 10);
+ resX = Math.min(resX, primary.x + primary.width - (10 + natWidth));
this.setArrowOrigin(sourceCenterX - resX);
break;
@@ -445,14 +444,14 @@ BoxPointer.prototype = {
this._arrowCorner = (this._arrowSide == St.Side.LEFT) ? St.Corner.TOPLEFT : St.Corner.TORIGHT;
resY = 10;
}
- else if (sourceCenterY > (primary.height - margin)) {
+ else if (sourceCenterY > (primary.y + primary.height - margin)) {
// Not enough space to the right
this._arrowCorner = (this._arrowSide == St.Side.LEFT) ? St.Corner.BOTTOMLEFT : St.Corner.BOTTOMRIGHT;
- resY = primary.height - (10 + natHeight);
+ resY = primary.y + primary.height - (10 + natHeight);
}
- resY = Math.max(resY, 10);
- resY = Math.min(resY, primary.height - (10 + natHeight));
+ resY = Math.max(resY, primary.y + 10);
+ resY = Math.min(resY, primary.y + primary.height - (10 + natHeight));
this.setArrowOrigin(sourceCenterY - resY);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]