GNOME Bugzilla – Bug 645343
Fix workspaces accumulating on each restart.
Last modified: 2011-03-21 21:49:03 UTC
Main._nWorkspacesChanged was racing with Main._checkWorkspaces, and when _checkWorkspaces was called before, _workspaces hadn't been initialized. Because of this, _checkWorkspaces only noticed workspaces with windows on them, leading it to believe the last workspace wasn't empty, and added a new, empty workspace.
Created attachment 183874 [details] [review] Fix workspaces accumulating on each restart.
Review of attachment 183874 [details] [review]: Not clear to me how the checkWorkspaces idle would happen first, really. There's no classic race condition here - idles are reliably executed in the order they are added. But if removing the idle for the initial nWorkspacesChanged works, it works, and I'm not really inclined to spend the time to track down the details. Body of comment message is sort of hard to parse - suggested edit 'and when _checkWorkspaces was called before, _workspaces hadn't been initialized' to 'if _checkWorkspaces won the race, _workspaces was uninitialized'
Pushed with the suggested commit message edit. Attachment 183874 [details] pushed as b16de0e - Fix workspaces accumulating on each restart.