diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index 8c410201e..de148fdd0 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -446,13 +446,13 @@ export const BoxPointer = GObject.registerClass({ () => (this._sourceActor = null), this); } - this._arrowAlignment = alignment; + this._arrowAlignment = Math.clamp(alignment, 0.0, 1.0); this.queue_relayout(); } setSourceAlignment(alignment) { - this._sourceAlignment = alignment; + this._sourceAlignment = Math.clamp(alignment, 0.0, 1.0); if (!this._sourceActor) return;