shell: Make migrate_workspace() a no-op on global workspace mode

Doing nothing may be a bit confusing, but `MigrateWorkspaceToOutput`
isn't bound by default anyway.
This commit is contained in:
Ian Douglas Scott 2025-09-18 10:03:48 -07:00 committed by Victoria Brekenfeld
parent 64a9c1badf
commit b8ffc89948

View file

@ -884,6 +884,11 @@ impl Workspaces {
handle: &WorkspaceHandle,
workspace_state: &mut WorkspaceUpdateGuard<'_, State>,
) {
// If workspaces span across outputs, they can't be moved to a different output
if self.mode == WorkspaceMode::Global {
return;
}
if !self.sets.contains_key(to) || from == to {
return;
}