diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/layout/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index cf61e87a..596079e0 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -634,6 +634,14 @@ impl<W: LayoutElement> Layout<W> { ws.set_output(Some(primary.output.clone())); } + let mut stopped_primary_ws_switch = false; + if !workspaces.is_empty() && primary.workspace_switch.is_some() { + // FIXME: if we're adding workspaces to currently invisible positions + // (outside the workspace switch), we don't need to cancel it. + primary.workspace_switch = None; + stopped_primary_ws_switch = true; + } + let empty_was_focused = primary.active_workspace_idx == primary.workspaces.len() - 1; @@ -648,6 +656,10 @@ impl<W: LayoutElement> Layout<W> { primary.active_workspace_idx = primary.workspaces.len() - 1; } + if stopped_primary_ws_switch { + primary.clean_up_workspaces(); + } + MonitorSet::Normal { monitors, primary_idx, |
