From e3eb4a20a53e19bede716a3006153b6cfe616f75 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 14 Feb 2013 21:22:49 -0500 Subject: [PATCH] layout: Remove _addBarrierEvent Moving it inline to when we get the event means that we can remove the duplicate call to _getDistanceAcrossBarrier. https://bugzilla.gnome.org/show_bug.cgi?id=693854 --- js/ui/layout.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index cae7f8187..f6443edbc 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -1190,11 +1190,6 @@ const PressureBarrier = new Lang.Class({ this._barrierEvents = this._barrierEvents.slice(firstNewEvent); }, - _addBarrierEvent: function(event) { - this._barrierEvents.push(event); - this._currentPressure += this._getDistanceAcrossBarrier(event); - }, - _onBarrierLeft: function(barrier, event) { this._reset(); }, @@ -1218,7 +1213,8 @@ const PressureBarrier = new Lang.Class({ this._lastTime = event.time; this._trimBarrierEvents(); - this._addBarrierEvent(event); + this._barrierEvents.push(event); + this._currentPressure += distance; if (this._currentPressure >= this._threshold) { this.emit('trigger');