summaryrefslogtreecommitdiff
path: root/src/detached/server.zig
diff options
context:
space:
mode:
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;