Skip to content

Instantly share code, notes, and snippets.

@Tireg
Created November 8, 2019 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tireg/6730c64acce6e7c48597201ef61114e6 to your computer and use it in GitHub Desktop.
Save Tireg/6730c64acce6e7c48597201ef61114e6 to your computer and use it in GitHub Desktop.
fix-workspace-manager-workspace-removed.patch
diff --git a/src/WorkspaceManager.vala b/src/WorkspaceManager.vala
index dd4a09e..24515e6 100644
--- a/src/WorkspaceManager.vala
+++ b/src/WorkspaceManager.vala
@@ -132,10 +132,16 @@ namespace Gala
void workspace_removed (Meta.WorkspaceManager manager, int index)
{
+ unowned List<Workspace> existing_workspaces = null;
+ for (int i = 0; i < manager.get_n_workspaces (); i++) {
+ existing_workspaces.append (manager.get_workspace_by_index (i));
+ }
+
var it = workspaces_marked_removed.iterator ();
while (it.next ()) {
var workspace = it.@get ();
- if (workspace.index () < 0)
+
+ if (existing_workspaces.index (workspace) < 0)
it.remove ();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment