Created
November 8, 2019 14:24
-
-
Save Tireg/cd97aa57df65706adb12b2f6210f580e to your computer and use it in GitHub Desktop.
Fix gala's multitasking view with mutter 3.3x
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/Widgets/MultitaskingView.vala b/src/Widgets/MultitaskingView.vala | |
index cede706..ef997df 100644 | |
--- a/src/Widgets/MultitaskingView.vala | |
+++ b/src/Widgets/MultitaskingView.vala | |
@@ -389,29 +389,20 @@ namespace Gala | |
// FIXME is there a better way to get the removed workspace? | |
#if HAS_MUTTER330 | |
unowned Meta.WorkspaceManager manager = display.get_workspace_manager (); | |
+ 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)); | |
+ } | |
#else | |
unowned List<Meta.Workspace> existing_workspaces = screen.get_workspaces (); | |
#endif | |
foreach (var child in workspaces.get_children ()) { | |
unowned WorkspaceClone clone = (WorkspaceClone) child; | |
-#if HAS_MUTTER330 | |
- for (int i = 0; i < manager.get_n_workspaces (); i++) { | |
- if (manager.get_workspace_by_index (i) == clone.workspace) { | |
- workspace = clone; | |
- break; | |
- } | |
- } | |
- | |
- if (workspace != null) { | |
- break; | |
- } | |
-#else | |
if (existing_workspaces.index (clone.workspace) < 0) { | |
workspace = clone; | |
break; | |
} | |
-#endif | |
} | |
if (workspace == null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment