Add automatic workspace management

Automatically add and remove workspaces so that the last workspace is
always empty and no workspaces are empty other than that workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
This commit is contained in:
Owen W. Taylor
2011-01-25 16:29:45 -05:00
parent 2d5133ad51
commit e6938ed06c
2 changed files with 100 additions and 30 deletions

View File

@ -1006,6 +1006,15 @@ WorkspacesDisplay.prototype = {
this._workspaceThumbnails.splice(removedIndex, removedNum);
}
// If we removed the current workspace, then metacity will have already
// switched to an adjacent workspace. Leaving the animation we
// started in response to that around will look funny because it's an
// animation for the *old* workspace configuration. So, kill it.
// If we animate the workspace removal in the future, we should animate
// the indicator as part of that.
Tweener.removeTweens(this._thumbnailIndicator);
this._constrainThumbnailIndicator();
this.workspacesView.updateWorkspaces(oldNumWorkspaces,
newNumWorkspaces,
lostWorkspaces);