diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 25469e341..9a702193f 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -902,7 +902,10 @@ const ThumbnailsBox = new Lang.Class({ }, _workspacesChanged: function() { - let oldNumWorkspaces = this._thumbnails.length; + let validThumbnails = this._thumbnails.filter(function(t) { + return t.state <= ThumbnailState.NORMAL; + }); + let oldNumWorkspaces = validThumbnails.length; let newNumWorkspaces = global.screen.n_workspaces; let active = global.screen.get_active_workspace_index();