forge
Explore
Log in

Don't you dare go Hollow

layout: Fix workspace swipe to same workspace forgetting previous id

Browse files at this commit

6d083ea49741d6e8e85d5a1d6b6bcaa837d3b5c0Ivan MolodetskikhParent: 7a42140
This manifested much more prominently in the overview.
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(