aboutsummaryrefslogtreecommitdiffstats
path: root/src/expr.c
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-15 19:38:38 +0200
committeruser <user@clank>2026-08-15 19:38:38 +0200
commite275a776406343a3a0476d557a5d8c724ccf3593 (patch)
tree79c5bdebe41461c361fb1e823a2e9a53276df342 /src/expr.c
parentsl0ppty: decode the PNGs programs actually send (diff)
downloadslosh-e275a776406343a3a0476d557a5d8c724ccf3593.tar.gz
slosh-e275a776406343a3a0476d557a5d8c724ccf3593.tar.xz
slosh-e275a776406343a3a0476d557a5d8c724ccf3593.zip
sl0ppty: answer the terminal when it is asked how big it is
XTWINOPS (CSI 14/16/18 t) went unanswered. A program that draws images needs the cell size to keep an aspect ratio; the pty's pixel fields are the first way to get it (D17) and this query is the second, which is what a program reaches for when those come back zeroed -- as they do on the far side of an ssh hop. Unanswered, the query times out and the program falls back to a guess: ida-tui guesses 10x20, and against a real 9x22 cell that is every image stretched by a fifth, which looks like a bug in the program rather than in us. Found alongside the png bug and from the same program, which asks `CSI 16 t` in the same round trip as its graphics query -- so once the png decoded, the picture would have appeared at the wrong shape. lib-vt encodes and writes the reply once the callback says what the numbers are; they come from the pane's own geometry, so a program is told about the pane it is in rather than the window. Mode 2048 (the in-band report on resize) already worked, because that one is answered from the size passed to ghostty_terminal_resize. Also notes in graphics.c what re-emission actually costs: we send decoded pixels because that is the only form lib-vt keeps, so an 819KB png reaches the client as 3.3MB of base64, once per image and again after a reattach clears `sent`. Fine for a splash, and written down so the next person to wonder does not have to measure it again.
Diffstat (limited to 'src/expr.c')
0 files changed, 0 insertions, 0 deletions