layout: Fix workspace swipe to same workspace forgetting previous id
Browse files at this commit6d083ea49741d6e8e85d5a1d6b6bcaa837d3b5c0Parent: 7a421401 changed file +3 -1
- src/layout/monitor.rs +3 -1
src/layout/monitor.rsmodified+3 -1
| @@ -1820,7 +1820,9 @@ impl<W: LayoutElement> Monitor<W> { | |||
| 1820 | 1820 | ||
| 1821 | velocity *= rubber_band.clamp_derivative(min, max, gesture.start_idx + current_pos); | 1821 | velocity *= rubber_band.clamp_derivative(min, max, gesture.start_idx + current_pos); |
| 1822 | 1822 | ||
| 1823 | - self.previous_workspace_id = Some(self.workspaces[self.active_workspace_idx].id()); | 1823 | + if self.active_workspace_idx != new_idx { |
| 1824 | + self.previous_workspace_id = Some(self.workspaces[self.active_workspace_idx].id()); | ||
| 1825 | + } | ||
| 1824 | 1826 | ||
| 1825 | self.active_workspace_idx = new_idx; | 1827 | self.active_workspace_idx = new_idx; |
| 1826 | self.workspace_switch = Some(WorkspaceSwitch::Animation(Animation::new( | 1828 | self.workspace_switch = Some(WorkspaceSwitch::Animation(Animation::new( |