From b6d85f941db2f5df389d007fb34fa18e0139a25a Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 2 Feb 2021 09:08:50 -0800 Subject: [PATCH] config: set speculative default pixel dims for initialize size A bit gross. Details in the comments added by this commit. --- config/src/lib.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config/src/lib.rs b/config/src/lib.rs index 41e54d17f..9a7175a79 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -1222,8 +1222,17 @@ impl Config { PtySize { rows: self.initial_rows, cols: self.initial_cols, - pixel_width: 0, - pixel_height: 0, + // Guess at a plausible default set of pixel dimensions. + // This is based on "typical" 10 point font at "normal" + // pixel density. + // This will get filled in by the gui layer, but there is + // an edge case where we emit an iTerm image escape in + // the software update banner through the mux layer before + // the GUI has had a chance to update the pixel dimensions + // when running under X11. + // This is a bit gross. + pixel_width: 8 * self.initial_cols, + pixel_height: 16 * self.initial_rows, } }