Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cosmic-comp-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pub struct AppearanceConfig {
pub clip_floating_windows: bool,
pub clip_tiled_windows: bool,
pub shadow_tiled_windows: bool,
pub disable_workspace_switch_animation: bool,
}

impl Default for AppearanceConfig {
Expand All @@ -62,6 +63,7 @@ impl Default for AppearanceConfig {
clip_floating_windows: true,
clip_tiled_windows: true,
shadow_tiled_windows: false,
disable_workspace_switch_animation: false,
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,13 @@ impl WorkspaceSet {
return Err(InvalidWorkspaceIndex);
}

// Animate if workspaces overview isn't open
// Animate if not disabled, and workspaces overview isn't open
let layer_map = layer_map_for_output(&self.output);
let animate = !layer_map
let workspaces_overview_not_open = !layer_map
.layers()
.any(|l| l.namespace() == WORKSPACE_OVERVIEW_NAMESPACE);
let animate =
workspaces_overview_not_open && !self.appearance.disable_workspace_switch_animation;

if self.active != idx {
let old_active = self.active;
Expand Down