summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev/tui/tui.zig12
1 files changed, 10 insertions, 2 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig
index ec5a3309..d1bbe140 100644
--- a/dev/tui/tui.zig
+++ b/dev/tui/tui.zig
@@ -791,6 +791,9 @@ pub fn runClient(init: std.process.Init, opts: pardes.Options, path: []const u8,
.client = &c,
.peers = &no_peers,
.ptys = &no_ptys,
+ // Its own motions (the glide) on the case's clock, as a session's
+ // own terminal's (`Own.open`).
+ .test_clock = host_io.testClock(),
};
tty = .{ .sh = &sh, .screen = &screen, .loop = &loop, .joins = &start };
no_inbox.wake_fn = Shell.wakeForQueue;
@@ -1490,8 +1493,13 @@ const Shell = struct {
} else next: {
if (wait != 0) {
// A virtual clock moves a frame a wake while the tty's own
- // motions move (the glide), as the real one would.
- s.wake_to = s.core.nextWake() orelse if (s.moving()) s.core.clock.now_ns + pardes.frame_ns else 0;
+ // motions move (the glide), as the real one would: a
+ // client's from where it is, its core's clock and wakes
+ // the session's, still between units.
+ s.wake_to = if (s.client != null)
+ (if (s.moving()) (s.test_clock orelse 0) + pardes.frame_ns else 0)
+ else
+ s.core.nextWake() orelse if (s.moving()) s.core.clock.now_ns + pardes.frame_ns else 0;
requestWake(s.io, wait);
}
pardes.turn.listen();