summaryrefslogtreecommitdiff
path: root/src/detached/server.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 03:06:32 -0300
committerGabriel Schneider <[email protected]>2026-10-01 03:07:15 -0300
commitf4d6af40a89e65ec63b250bf76d1bd1021777dd8 (patch)
treee2f9db8b7c5fe77e4abc3b66d3fb637fb3a21ebd /src/detached/server.zig
parent422ad65025edd994b04728632fc96de4ebda07f7 (diff)
downloadpardes-f4d6af40a89e65ec63b250bf76d1bd1021777dd8.tar.gz
pardes-f4d6af40a89e65ec63b250bf76d1bd1021777dd8.zip
A detached session's pty is sized in pixels too, at the last frontend's cell size or a nominal 8x16 before one attached
forkShell sized a new pty in pixels (ptyWinsize), but the detached server's resize set xpixel and ypixel to 0, and a pane is resized as it is placed, so a program in a detached session with no frontend (yazi) saw a pty with no pixels and drew no images. CSI 14/16/18 t were already answered at the nominal 8x16 cell. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/detached/server.zig')
-rw-r--r--src/detached/server.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/detached/server.zig b/src/detached/server.zig
index 588912bb..79d1189a 100644
--- a/src/detached/server.zig
+++ b/src/detached/server.zig
@@ -549,7 +549,9 @@ pub const Session = struct {
if (pane >= s.ptys.len) return;
const fd = s.ptys[pane].fd;
if (fd < 0) return;
- const ws: posix.winsize = .{ .row = rows, .col = cols, .xpixel = 0, .ypixel = 0 };
+ // In pixels too, at the last frontend's cell size (8x16 before
+ // one attached): a program sizes its kitty graphics by them.
+ const ws = host_io.ptyWinsize(s.core, cols, rows);
_ = posix.system.ioctl(fd, TIOCSWINSZ, @intFromPtr(&ws));
}