summaryrefslogtreecommitdiff
path: root/src/detached/server.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-15 14:46:38 -0300
committerGabriel Schneider <[email protected]>2026-09-15 17:24:42 -0300
commit40c19fd4f52d20df94c2dfa2d68102b89bd9d3f1 (patch)
tree642150be8703f1d9a0766ff18516f06bfdc8801a /src/detached/server.zig
parent379f4fe55c7c9c7c8cc7b97dc921c83e2c24698b (diff)
downloadpardes-40c19fd4f52d20df94c2dfa2d68102b89bd9d3f1.tar.gz
pardes-40c19fd4f52d20df94c2dfa2d68102b89bd9d3f1.zip
Add optional compact tagline styling for source context
Diffstat (limited to 'src/detached/server.zig')
-rw-r--r--src/detached/server.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/detached/server.zig b/src/detached/server.zig
index 9d83d3eb..82abc432 100644
--- a/src/detached/server.zig
+++ b/src/detached/server.zig
@@ -707,7 +707,7 @@ pub const Session = struct {
fn sendFrame(s: *Session, c: *Client, surface: *const pardes.Surface) void {
const cells = surface.cells;
- const want = wire.frameBound(surface.cols, surface.rows);
+ const want = wire.frameBound(surface.cols, surface.rows) + wire.layersBound(&surface.body_layers);
s.scratch.ensureTotalCapacity(s.gpa, want) catch return s.close(c, .oom);
const prev: []const pardes.Cell = if (c.need_full or c.mirror.items.len != cells.len)
&.{}
@@ -717,7 +717,7 @@ pub const Session = struct {
.{ .x = cur.x, .y = cur.y, .bar = cur.bar }
else
null;
- const bytes = wire.encodeFramePointer(
+ const bytes = wire.encodeFrameLayers(
s.scratch.allocatedSlice()[0..want],
surface.cols,
surface.rows,
@@ -725,6 +725,7 @@ pub const Session = struct {
surface.pointer_shape,
cells,
prev,
+ &surface.body_layers,
) catch |err| {
log.debug("frame {d}x{d} not encodable: {t}", .{ surface.cols, surface.rows, err });
return;
@@ -987,6 +988,7 @@ pub const Session = struct {
.resize => |r| {
c.cols = r.cols;
c.rows = r.rows;
+ if (r.row_metrics) |metrics| s.core.row_metrics = metrics;
},
else => {
s.origin = slot;