From 01bd10f485c18b794228cece8adc68299aa20b35 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" <jstpierre@mecheye.net> Date: Thu, 21 Feb 2013 17:19:04 -0500 Subject: [PATCH] layout: Cap each event to 15px of motion When pressing against the bottom of the screen, we shouldn't really take more than 15px from each event, to prevent spruious mouse movements from opening the barrier. https://bugzilla.gnome.org/show_bug.cgi?id=694467 --- js/ui/layout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index ad0ed42d7..f8b91b73a 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -1330,7 +1330,7 @@ const PressureBarrier = new Lang.Class({ this._trimBarrierEvents(); this._barrierEvents.push(event); - this._currentPressure += distance; + this._currentPressure += Math.min(15, distance); if (this._currentPressure >= this._threshold) { this.emit('trigger');