From 19d5ed92f4176824b51bd62f152f75e27308ae32 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Thu, 14 Sep 2023 15:30:08 +0200 Subject: [PATCH] shell: Don't remove workspaces during animations --- src/shell/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 47a34db6..52ced80a 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -288,16 +288,16 @@ impl WorkspaceSet { if Instant::now().duration_since(start).as_millis() >= ANIMATION_DURATION.as_millis() { self.previously_active = None; } - } - - match self.amount { - WorkspaceAmount::Dynamic => self.ensure_last_empty(state, outputs), - WorkspaceAmount::Static(len) => { - self.ensure_static(len as usize, state, toplevel_info, outputs) + } else { + match self.amount { + WorkspaceAmount::Dynamic => self.ensure_last_empty(state, outputs), + WorkspaceAmount::Static(len) => { + self.ensure_static(len as usize, state, toplevel_info, outputs) + } } - } - self.workspaces[self.active].refresh(); + self.workspaces[self.active].refresh(); + } } fn ensure_last_empty<'a>(