c1104500
Final polish: restore SIGUSR1 under visibility gate, drop unused import
a73x 2026-04-16 19:05
- SIGUSR1 stats dump moved above the render gate in runTerminal so it fires even while the surface is hidden (regression from the gate migration). - Remove unused `const wl` import from src/frame_loop.zig; the module doesn't reference wl directly — adapter casts happen in wayland.zig.
diff --git a/src/frame_loop.zig b/src/frame_loop.zig index 46a2c21..3624b38 100644 --- a/src/frame_loop.zig +++ b/src/frame_loop.zig @@ -1,5 +1,4 @@ const std = @import("std"); const wl = @import("wayland").client.wl; const scale_tracker = @import("scale_tracker"); // Mirror of wayland.SurfaceState. Using a structural duplicate here instead of diff --git a/src/main.zig b/src/main.zig index 0c90551..cac9e5a 100644 --- a/src/main.zig +++ b/src/main.zig @@ -342,6 +342,13 @@ fn runTerminal(alloc: std.mem.Allocator) !void { render_pending = true; } // Stats dump is valid regardless of visibility — fires even while // the surface is hidden, so an operator can SIGUSR1 a stuck-seeming // waystty and get a response. if (sigusr1_received.swap(false, .acq_rel)) { printFrameStats(computeFrameStats(&frame_ring)); } if (!shouldRenderFrame(render_pending, false, false)) continue; if (!bench_unthrottled and !frame_loop.canRender()) continue; // hidden — no Vulkan at all @@ -617,11 +624,6 @@ fn runTerminal(alloc: std.mem.Allocator) !void { frame_ring.push(frame_timing); // Check for SIGUSR1 stats dump request if (sigusr1_received.swap(false, .acq_rel)) { printFrameStats(computeFrameStats(&frame_ring)); } clearConsumedDirtyFlags(&term.render_state.dirty, dirty_rows, refresh_plan); if (!bench_unthrottled) try frame_loop.commitRender(); render_pending = false;