GNOME Bugzilla – Bug 721417
WorkspacesView: fix removal of workspaces that are not at the end
Last modified: 2014-01-03 21:46:48 UTC
Reproducer: have a workspace with only one window, between two other workspaces with windows. Go to the overview. Move that window to another workspace, observe the workspace is correctly "garbage collected". Now move around in the overview using the workspace bar. Observe that the window area does not match the workspace bar and the outside desktop.
Created attachment 265240 [details] [review] WorkspacesView: fix removal of workspaces that are not at the end Workspaces can removed from any index, and in particular they will be removed by the WorkspaceTracker if they stop containing windows at some point. Make sure WorkspacesView is not confused and destroyes the right Workspace objects.
Review of attachment 265240 [details] [review]: ::: js/ui/workspacesView.js @@ +269,3 @@ + if (needsUpdate && this._fullGeometry) + this._updateWorkspaceActors(false); + I'm confused. If a workspace is removed in the middle, won't we need to update the positions of the workspace actors after it?
Created attachment 265257 [details] [review] WorkspacesView: fix removal of workspaces that are not at the end Workspaces can removed from any index, and in particular they will be removed by the WorkspaceTracker if they stop containing windows at some point. Make sure WorkspacesView is not confused and destroyes the right Workspace objects.
Review of attachment 265257 [details] [review]: ::: js/ui/workspacesView.js @@ +251,3 @@ this.actor.add_actor(workspace.actor); + this._workspaces[j] = workspace; + needsUpdate = true; needsUpdate seems to be unused now.
Attachment 265257 [details] pushed as 1b152e6 - WorkspacesView: fix removal of workspaces that are not at the end