diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-13 08:11:51 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-13 08:17:15 +0300 |
| commit | 6d083ea49741d6e8e85d5a1d6b6bcaa837d3b5c0 (patch) | |
| tree | 78328594f05916902c62e5ff5d7fa27ed51a3537 | |
| parent | 7a42140d6c187f9289cf10cdc897faf4e741b7a4 (diff) | |
| download | niri-6d083ea49741d6e8e85d5a1d6b6bcaa837d3b5c0.tar.gz niri-6d083ea49741d6e8e85d5a1d6b6bcaa837d3b5c0.tar.bz2 niri-6d083ea49741d6e8e85d5a1d6b6bcaa837d3b5c0.zip | |
layout: Fix workspace swipe to same workspace forgetting previous id
This manifested much more prominently in the overview.
| -rw-r--r-- | src/layout/monitor.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/layout/monitor.rs b/src/layout/monitor.rs index 6c2a906a..01602001 100644 --- a/src/layout/monitor.rs +++ b/src/layout/monitor.rs @@ -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( |
