layout: Fix old event removal
If we increment our index variable while looping, this means that firstNewEvent will be one higher than it should. With a length 1 array, all events will be removed, so this has a cascading effect that events will not be stored at all. https://bugzilla.gnome.org/show_bug.cgi?id=693854
This commit is contained in:
parent
382cc52baa
commit
001bbd36f5
@ -1176,8 +1176,9 @@ const PressureBarrier = new Lang.Class({
|
||||
// and then chop events after that off.
|
||||
let i = 0;
|
||||
while (i < this._barrierEvents.length) {
|
||||
if (!this._isBarrierEventTooOld(this._barrierEvents[i++]))
|
||||
if (!this._isBarrierEventTooOld(this._barrierEvents[i]))
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
|
||||
let firstNewEvent = i;
|
||||
|
Loading…
Reference in New Issue
Block a user