summaryrefslogtreecommitdiff
path: root/src/gui/gui.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 16:50:58 -0300
committerGabriel Schneider <[email protected]>2026-10-30 17:40:51 -0300
commitd92ea9dfdd9198b69bff420c3b594f0ffed1e1bb (patch)
treef9102920bad857c51aa7103ec4ae8b621d706213 /src/gui/gui.zig
parent5938a84d98815818598f5505646edec762089270 (diff)
downloadpardes-d92ea9dfdd9198b69bff420c3b594f0ffed1e1bb.tar.gz
pardes-d92ea9dfdd9198b69bff420c3b594f0ffed1e1bb.zip
Messages: a detached session's messages go on the clock in the pump, after its wait, not in the host's wait: the host's call (tty waitInput, gui waitDetached) was no input, its clock read untaped, so a replay (and every replica of a session nobody attached) kept a message its session had let go; with MessageLinger 0 (test/daemon.py's sessions) a tape whose session said a failure never replayed, on main too (pane 0's msg, digest 6, 7 of 7 runs; 0 of 6 after); test/cross_replay.py's session says MessageLinger 0 again
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/gui/gui.zig')
-rw-r--r--src/gui/gui.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index c3fdd63a..ead89a8a 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -4941,9 +4941,8 @@ fn waitInput(ctx: ?*anyopaque, timeout_ms: u32) void {
/// Detached: no window, asleep until the queue's wake (an SDL user event:
/// a pty's output, the daemon's window request), the core's next wake, or a
/// quit (SDL makes SIGTERM and SIGINT one). With nobody to dismiss them,
-/// messages go on the clock.
+/// messages go on the clock (the pump's, after this wait), which wakes it.
fn waitDetached(core: *pardes.Pardes, timeout_ms: u32) void {
- pardes.Messages.expireUnattended(core);
var ms: c_int = if (timeout_ms != 0) @intCast(@min(timeout_ms, std.math.maxInt(c_int))) else -1;
for (core.panes) |slot| if (slot) |pane| if (pane.msg_len > 0) {
ms = if (ms < 0) 100 else @min(ms, 100);