fix: report correct screen pixel size

Mode 2048 and CSI 14 t are size report control sequences which contain
the text area size in pixels. The text area is defined to be the extents
of the grid (rows and columns). Ghostty calculates the available size
for the text area by setting the available padding, and then filling as
much of the remaining space as possible. However, if there are remainder
pixels these are still reported as part of the text area size.

Pass the cell_size geometry through so that we can always report the
correct value: columns * cell width and rows * cell height.
This commit is contained in:
Tim Culverhouse
2024-10-18 22:29:52 -05:00
parent 0084103ff1
commit 4f1cee8eb9
5 changed files with 26 additions and 11 deletions

View File

@@ -383,6 +383,7 @@ fn coalesceCallback(
cb.io.resize(
&cb.data,
v.grid_size,
v.cell_size,
v.screen_size,
v.padding,
) catch |err| {