Created
November 8, 2019 14:01
-
-
Save Tireg/7641308eea067e6ea28753d4bb86a430 to your computer and use it in GitHub Desktop.
Fix last index of the gala cleanup function
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 e2da277..c49fe4c 100644 | |
--- a/src/WorkspaceManager.vala | |
+++ b/src/WorkspaceManager.vala | |
@@ -389,13 +389,13 @@ namespace Gala | |
#if HAS_MUTTER330 | |
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++) { | |
existing_workspaces.append (manager.get_workspace_by_index (i)); | |
} | |
foreach (var workspace in workspaces) { | |
+ var last_index = manager.get_n_workspaces () - 1; | |
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