Created
November 8, 2019 13:22
-
-
Save Tireg/6730c64acce6e7c48597201ef61114e6 to your computer and use it in GitHub Desktop.
fix-workspace-manager-workspace-removed.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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