summaryrefslogtreecommitdiff
path: root/src/replica.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/replica.zig')
-rw-r--r--src/replica.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/replica.zig b/src/replica.zig
index 32c8acd7..09746377 100644
--- a/src/replica.zig
+++ b/src/replica.zig
@@ -730,7 +730,7 @@ pub const Replica = struct {
pub fn initDump(gpa: Allocator, id: u16, view: u8, bytes: []const u8, opts: pardes.Options) !*Replica {
const r = try gpa.create(Replica);
r.* = .{ .gpa = gpa, .id = id, .view = view, .t = tape.memory(gpa), .guess = true };
- r.t.headless = true;
+ r.t.skips_render = true;
// Its terminals are the session's deltas (Peers sends them).
r.t.screen_state = true;
errdefer {
@@ -1847,9 +1847,9 @@ pub const Peers = struct {
/// Wakes the session's loop (its wait for input) from a reader.
wake_ctx: ?*anyopaque = null,
wake: ?*const fn (?*anyopaque) void = null,
- /// What the session would be with no client: unattended without a
- /// terminal of its own (the host says).
- alone_unattended: bool = false,
+ /// No frontend of its own (the host says): with no client either, the
+ /// session is unattended.
+ detached: bool = false,
/// The worst a join cost the session's step, and the last one's dump.
join_ns: u64 = 0,
each_join: std.ArrayListUnmanaged(u64) = .empty,
@@ -2044,7 +2044,7 @@ pub const Peers = struct {
// its view not kept yet, and takes a new one.
const back = if (joining.view) |v| core.rejoinView(v) else false;
const k = (if (back) joining.view else core.openView()) orelse {
- core.unattended = ps.count() == 0 and ps.alone_unattended;
+ core.unattended = ps.count() == 0 and ps.detached;
if (ps.count() == 0) ps.stop(core);
return daemon.refuseReplica(fd, "that session has as many views as it takes");
};
@@ -2117,7 +2117,7 @@ pub const Peers = struct {
ps.screens.dropPeer(peer.sid);
core.undrawn &= ~(@as(u8, 1) << @intCast(peer.view));
ps.closeViewOf(core, peer, peer.again);
- if (ps.count() == 0) core.unattended = ps.alone_unattended;
+ if (ps.count() == 0) core.unattended = ps.detached;
ps.seq += 1;
ps.unit(0, ps.seq);
ps.letGo(peer);
@@ -2129,7 +2129,7 @@ pub const Peers = struct {
/// session no one else watches leaves the session its layout, for a
/// client that comes after to find.
fn closeViewOf(ps: *Peers, core: *Pardes, peer: *Peer, again: bool) void {
- if (again) core.awayView(peer.view) else if (ps.count() == 0 and ps.alone_unattended) core.leaveView(peer.view) else core.closeView(peer.view);
+ if (again) core.awayView(peer.view) else if (ps.count() == 0 and ps.detached) core.leaveView(peer.view) else core.closeView(peer.view);
}
/// Its threads ended and joined, its link closed.
@@ -2265,7 +2265,7 @@ pub const Peers = struct {
};
ps.inbox.clearRetainingCapacity();
ps.lock.unlock(ps.io);
- core.unattended = ps.alone_unattended;
+ core.unattended = ps.detached;
}
pub fn deinit(ps: *Peers) void {