Skip to content

workspaceAnimation: Don't activate workspace if it was removed

With dynamic workspaces enabled, if the second last workspace had a single window, which closed during the swipe workspace switch fling animation was animating a workspace switch to the last (empty) workspace, we'd end up calling newWs.activate() on the removed workspace.

This wasn't handled gracefully by mutter, who assumed valid input was passed, resulting an an abort() being hit.

Fix this by keeping track of whether the workspace was removed while the animation is ongoing.

Fixes a crash in mutter originating from

#0 ui/workspaceAnimation.js:466
#1 ui/environment.js:153
#2 ui/environment.js:317

With the logged warning

Bug in window manager: Failed to find destination workspace in layout

Fixes the shell side of the issue discussed in mutter!2707 (merged) .

Merge request reports