[gnome-shell] MonitorConstraint: fix clamping monitor index
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] MonitorConstraint: fix clamping monitor index
- Date: Thu, 16 Aug 2012 20:16:00 +0000 (UTC)
commit cbd2188c044679bc0129c67e7c60236a8776967b
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Aug 16 22:12:23 2012 +0200
MonitorConstraint: fix clamping monitor index
I will test my patches, I promise.
js/ui/layout.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index c833a1b..333b809 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -83,7 +83,7 @@ const MonitorConstraint = new Lang.Class({
if (this._primary) {
monitor = Main.layoutManager.primaryMonitor;
} else {
- let index = Math.max(this._index, Main.layoutManager.monitors.length);
+ let index = Math.min(this._index, Main.layoutManager.monitors.length - 1);
monitor = Main.layoutManager.monitors[index];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]