Skip to content

workspace: Don't freeze the layout when there's no layout yet

On some touchpads/laptops, the swipe gesture to open the overview can be performed so fast, that it starts and ends in between two frames. Now when this happens, and the gesture ended with too little movement to confidently say the user intended to open the overview, we'll close the overview again.

While closing the overview, we freeze the layout of the Workspace in order to avoid changes to windows messing with the animation. This means that in the case described above, we freeze the layout even before the first frame of the opening animation happens. No frames being drawn also means no allocations happening, and since we create this._layout in vfunc_allocate(), this means that on the first allocation cycle of the overview we'll see this._layoutFrozen = true, but will also not have a this._layout nor this._windowSlots.

This creates an annoying visual glitch where for a split second all the windows disappear (overview is visible but no WindowPreviews get allocated).

To fix this, disallow freezing the layout when we don't have a valid this._layout yet, this effectively disallows freezeing the layout before the first allocation cycle.

Merge request reports