forge
Explore
Log in

Don't you dare go Hollow

input: Fix move-workspace-to-index being one off

Browse files at this commit

e8da89a430f4af0accfe80efe286b2cffd20a4aaIvan MolodetskikhParent: feae8c1
src/input/mod.rsmodified+2 -0
@@ -1295,12 +1295,14 @@ impl State {
12951295 self.niri.queue_redraw_all();
12961296 }
12971297 Action::MoveWorkspaceToIndex(new_idx) => {
1298+ let new_idx = new_idx.saturating_sub(1);
12981299 self.niri.layout.move_workspace_to_idx(None, new_idx);
12991300 // FIXME: granular
13001301 self.niri.queue_redraw_all();
13011302 }
13021303 Action::MoveWorkspaceToIndexByRef { new_idx, reference } => {
13031304 if let Some(res) = self.niri.find_output_and_workspace_index(reference) {
1305+ let new_idx = new_idx.saturating_sub(1);
13041306 self.niri.layout.move_workspace_to_idx(Some(res), new_idx);
13051307 // FIXME: granular
13061308 self.niri.queue_redraw_all();