From 27794ef4f2b073931393ccc9528fc6fee2d9d436 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 9 Apr 2026 16:42:02 +0200 Subject: [PATCH] refactor(gui): trace wio events --- src/gui/wio/app.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/wio/app.zig b/src/gui/wio/app.zig index 0cd9edcd..bc53e8a9 100644 --- a/src/gui/wio/app.zig +++ b/src/gui/wio/app.zig @@ -439,6 +439,7 @@ fn wioLoop() void { // during createWindow. This ensures dpi_scale and win_size are correct before // the first reloadFont / sendResize, avoiding a brief render at the wrong scale. while (window.getEvent()) |event| { + thespian.trace(thespian.channel.event, .{ "wio", "init", event }); switch (event) { .scale => |s| dpi_scale = s, .size_physical => |sz| win_size = sz, @@ -447,6 +448,7 @@ fn wioLoop() void { } // Notify the tui that the window is ready + thespian.trace(thespian.channel.event, .{ "wio", "WindowCreated", win_size.width, win_size.height }); reloadFont(); sendResize(win_size, &state, &cell_width, &cell_height); tui_pid.send(.{ "RDR", "WindowCreated", @as(usize, 0) }) catch {}; @@ -463,6 +465,7 @@ fn wioLoop() void { maybeReloadFont(win_size, &state, &cell_width, &cell_height); while (window.getEvent()) |event| { + thespian.trace(thespian.channel.event, .{ "wio", "event", event }); switch (event) { .close => { running = false; @@ -579,7 +582,9 @@ fn wioLoop() void { held_buttons = .{}; tui_pid.send(.{"focus_out"}) catch {}; }, - else => {}, + else => { + std.log.debug("wio unhandled event: {}", .{event}); + }, } }