MonitorConstraint: fix clamping monitor index
I will test my patches, I promise.
This commit is contained in:
parent
2b30afa618
commit
cbd2188c04
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user