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.
+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), |