1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00

fixup initial pty dimensions to account for font/dpi size

refs: https://github.com/wez/wezterm/issues/563
This commit is contained in:
Wez Furlong 2021-03-20 13:17:32 -07:00
parent 1cf335cb45
commit 8015791dd0
2 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@ brief notes about them may accumulate here.
* Fixed: 100% CPU due to spurious resize events generated by herbstluftwm. [#557](https://github.com/wez/wezterm/issues/557)
* Fixed: improved conformance with xterm for keys like CTRL-6 and CTRL-/. [#556](https://github.com/wez/wezterm/discussions/556)
* Fixed: detection and handling of fonts such as terminus-bold.otb that contain only bitmap strikes. [#560](https://github.com/wez/wezterm/issues/560)
* Fixed: the pixel size reported by the pty to the kernel wasn't adjusted for font metrics/dpi until the config was reloaded or window resized. [#563](https://github.com/wez/wezterm/issues/563)
### 20210314-114017-04b7cedd

View File

@ -360,6 +360,11 @@ impl WindowCallbacks for TermWindow {
);
self.render_state.replace(gl);
Self::start_periodic_maintenance(window.clone());
// Update dimensions: the goal here is to factor in the dpi and font
// size adjusted GUI window dimensions and apply those to the dimensions
// of the pty in the Mux layer.
let dims = self.dimensions.clone();
self.apply_dimensions(&dims, None);
}
Err(err) => {
log::error!("failed to create OpenGLRenderState: {}", err);