From f484ea0b57ece8e48a8596c575c6feadbdb793fc Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 1 Apr 2026 10:10:18 +0200 Subject: [PATCH] fix(gui): add pixel offsets to scroll events --- src/gui/wio/app.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/wio/app.zig b/src/gui/wio/app.zig index 024fabca..6cfffb05 100644 --- a/src/gui/wio/app.zig +++ b/src/gui/wio/app.zig @@ -403,12 +403,12 @@ fn wioLoop() void { .scroll_vertical => |dy| { const btn_id: u8 = if (dy < 0) 64 else 65; // up / down scroll const cp = pixelToCellPos(mouse_pos); - tui_pid.send(.{ "RDR", "B", @as(u8, 1), btn_id, cp.col, cp.row, @as(i32, 0), @as(i32, 0) }) catch {}; + tui_pid.send(.{ "RDR", "B", @as(u8, 1), btn_id, cp.col, cp.row, cp.xoff, cp.yoff }) catch {}; }, .scroll_horizontal => |dx| { const btn_id: u8 = if (dx < 0) 66 else 67; // left / right scroll const cp = pixelToCellPos(mouse_pos); - tui_pid.send(.{ "RDR", "B", @as(u8, 1), btn_id, cp.col, cp.row, @as(i32, 0), @as(i32, 0) }) catch {}; + tui_pid.send(.{ "RDR", "B", @as(u8, 1), btn_id, cp.col, cp.row, cp.xoff, cp.yoff }) catch {}; }, .focused => window.enableTextInput(.{}), .unfocused => window.disableTextInput(),