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
This commit is contained in:
Jasper St. Pierre 2013-02-21 17:19:04 -05:00
parent 476eacd5ca
commit 01bd10f485

View File

@ -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');