Created
November 8, 2019 13:54
-
-
Save Tireg/a29bf78009f2e6ab65b131cbcfe8486a to your computer and use it in GitHub Desktop.
Fix workspace manager cleanup loop with mutter 3.3x (gala)
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..e2da277 100644 | |
--- a/src/WorkspaceManager.vala | |
+++ b/src/WorkspaceManager.vala | |
@@ -390,8 +390,12 @@ namespace Gala | |
unowned Meta.Display display = wm.get_display (); | |
unowned Meta.WorkspaceManager manager = display.get_workspace_manager (); | |
var last_index = manager.get_n_workspaces () - 1; | |
+ unowned List<Meta.Workspace> existing_workspaces = null; | |
for (int i = 0; i < manager.get_n_workspaces (); i++) { | |
- unowned Meta.Workspace workspace = manager.get_workspace_by_index (i); | |
+ existing_workspaces.append (manager.get_workspace_by_index (i)); | |
+ } | |
+ | |
+ foreach (var workspace in workspaces) { | |
if (Utils.get_n_windows (workspace) < 1 | |
&& workspace.index () != last_index) { | |
remove_workspace (workspace); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment