shell: If active workspace moved, add WState::Active to new active

This commit is contained in:
Ian Douglas Scott 2025-03-10 13:33:02 -07:00 committed by Victoria Brekenfeld
parent 2b7f898e83
commit c72002e15a

View file

@ -705,7 +705,12 @@ impl Workspaces {
.workspaces
.iter()
.position(|w| w.handle == active_handle)
.unwrap_or(other_set.workspaces.len() - 1);
.unwrap_or_else(|| {
let idx = other_set.workspaces.len() - 1;
let workspace = &other_set.workspaces[idx];
workspace_state.add_workspace_state(&workspace.handle, WState::Active);
idx
})
}
// Add `moved_workspaces` to set, and update output and index of workspaces