After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645343 - Fix workspaces accumulating on each restart.
Fix workspaces accumulating on each restart.
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-20 23:37 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-03-21 21:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix workspaces accumulating on each restart. (1.05 KB, patch)
2011-03-20 23:37 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-03-20 23:37:35 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.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-03-20 23:37:38 UTC
Created attachment 183874 [details] [review]
Fix workspaces accumulating on each restart.
Comment 2 Owen Taylor 2011-03-21 16:00:01 UTC
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'
Comment 3 Owen Taylor 2011-03-21 21:49:00 UTC
Pushed with the suggested commit message edit.

Attachment 183874 [details] pushed as b16de0e - Fix workspaces accumulating on each restart.