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 699350 - window-list: Fix edge case with static workspaces
window-list: Fix edge case with static workspaces
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-30 19:44 UTC by Florian Müllner
Modified: 2013-04-30 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window-list: Use notify::n-workspaces to recreate workspace menu (1.70 KB, patch)
2013-04-30 19:44 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2013-04-30 19:44:42 UTC
I'm sure this issue has been reported before, but I'm unable to find the corresponding bug:

 - enable static workspaces
 - open windows on all workspaces
 - restart the shell

The workspace indicator now reports one too many workspaces (both in the indicator and inside the menu).
Comment 1 Florian Müllner 2013-04-30 19:44:47 UTC
Created attachment 242959 [details] [review]
window-list: Use notify::n-workspaces to recreate workspace menu

When the number of workspaces changes, we clear the existing menu
and recreate it based on the screen::n-workspaces property, so it
is slightly more correct to track changes to the property directly
instead of using the workspace-added/workspace-removed signals.
This change also fixes a corner case, where changes to the property
before workspaces are initialized are missed and we end up with the
wrong number of workspaces.
Comment 2 Giovanni Campagna 2013-04-30 19:53:23 UTC
Review of attachment 242959 [details] [review]:

Looks good.
Comment 3 Florian Müllner 2013-04-30 19:54:37 UTC
Attachment 242959 [details] pushed as f38d61b - window-list: Use notify::n-workspaces to recreate workspace menu