mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
There are a number of open issues that relate to getting the dpi wrong when spawning a window. In theory it shouldn't matter because we will immediately realize the difference and synthesize the correct information, but evidence shows this isn't quite true. What this commit does is: * Override Connection::default_dpi() on macOS to return the effective_dpi from the active screen instead of the default non-retina dpi * Adjust the Config::initial_size() method to accept an optional cell pixel dimension * Add a helper function to wezterm-gui to compute the cell pixel dimensions given the config and the (usually default) dpi, and feed that through to Config::initial_size * in the macos window impl, scale the computed geometry based on the ratio of the Connection::default_dpi and the default non-retina dpi. This helps to avoid needing to do a fixup in the https://github.com/wez/wezterm/issues/4966 case, and may help with the various other macos quirky issues. refs: https://github.com/wez/wezterm/issues/2958 refs: https://github.com/wez/wezterm/issues/3575 refs: https://github.com/wez/wezterm/issues/3900 refs: https://github.com/wez/wezterm/issues/4250 refs: https://github.com/wez/wezterm/issues/4285 refs: https://github.com/wez/wezterm/issues/4447 refs: https://github.com/wez/wezterm/issues/4851 refs: https://github.com/wez/wezterm/issues/4966 |
||
---|---|---|
.. | ||
derive | ||
src | ||
Cargo.toml |