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 721417 - WorkspacesView: fix removal of workspaces that are not at the end
WorkspacesView: fix removal of workspaces that are not at the end
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-03 18:06 UTC by Giovanni Campagna
Modified: 2014-01-03 21:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
WorkspacesView: fix removal of workspaces that are not at the end (2.71 KB, patch)
2014-01-03 18:06 UTC, Giovanni Campagna
none Details | Review
WorkspacesView: fix removal of workspaces that are not at the end (2.71 KB, patch)
2014-01-03 21:05 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2014-01-03 18:06:28 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.
Comment 1 Giovanni Campagna 2014-01-03 18:06:31 UTC
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.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-01-03 18:33:08 UTC
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?
Comment 3 Giovanni Campagna 2014-01-03 21:05:53 UTC
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.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-01-03 21:12:21 UTC
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.
Comment 5 Giovanni Campagna 2014-01-03 21:46:44 UTC
Attachment 265257 [details] pushed as 1b152e6 - WorkspacesView: fix removal of workspaces that are not at the end