tony / oxwm

fix: pass int_arg to focusstack/movestack dispatch Browse files
The .focus_next and .move_next dispatch arms hardcoded direction to 1,
ignoring the int_arg passed from Lua via createActionTableWithInt. This
caused oxwm.client.focus_stack(-1) and oxwm.client.move_stack(-1) to
behave identically to their +1 counterparts; the .focus_prev and
.move_prev variants were unreachable from the Lua side because
parseAction maps both "FocusStack" and "MoveStack" only to the _next
variants.

Pass int_arg through so direction works as documented.
CodyWan committed 2026-05-05 parent b0374a4 commit 61c6a945e1f5ceb92a2ad0a7aed9c1b58bf6c631
Showing 1 changed file with 2 additions and 2 deletions. UnifiedSplit
+2 −2 src/wm/actions.zig
@@ -797,9 +797,9 @@ pub fn executeAction(action: config_mod.Action, int_arg: i32, str_arg: ?[]const
797 } 797 }
798 } 798 }
799 }, 799 },
800 - .focus_next => focusstack(1, wm), 800 + .focus_next => focusstack(int_arg, wm),
801 .focus_prev => focusstack(-1, wm), 801 .focus_prev => focusstack(-1, wm),
802 - .move_next => movestack(1, wm), 802 + .move_next => movestack(int_arg, wm),
803 .move_prev => movestack(-1, wm), 803 .move_prev => movestack(-1, wm),
804 .resize_master => setmfact(@as(f32, @floatFromInt(int_arg)) / 1000.0, wm), 804 .resize_master => setmfact(@as(f32, @floatFromInt(int_arg)) / 1000.0, wm),
805 .inc_master => incnmaster(1, wm), 805 .inc_master => incnmaster(1, wm),