layout: Fix workspace swipe to same workspace forgetting previous id

This manifested much more prominently in the overview.
This commit is contained in:
Ivan Molodetskikh
2025-05-13 08:11:51 +03:00
parent 7a42140d6c
commit 6d083ea497
+3 -1
View File
@@ -1820,7 +1820,9 @@ impl<W: LayoutElement> Monitor<W> {
velocity *= rubber_band.clamp_derivative(min, max, gesture.start_idx + current_pos);
self.previous_workspace_id = Some(self.workspaces[self.active_workspace_idx].id());
if self.active_workspace_idx != new_idx {
self.previous_workspace_id = Some(self.workspaces[self.active_workspace_idx].id());
}
self.active_workspace_idx = new_idx;
self.workspace_switch = Some(WorkspaceSwitch::Animation(Animation::new(