wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
14.88k stars 677 forks source link

Custom DPI in config is ignored after first window resize #5453

Open ashleysommer opened 1 month ago

ashleysommer commented 1 month ago

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

KDE Plasma 6.0.2

WezTerm version

Nightly 20240520-135708-b8f94c47

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

I just switched from the old release 20240203-110809-5046fc22 to latest nightly 20240520-135708-b8f94c47 and I'm seeing this new behaviour.

When wezterm window opens, the scaling matches the custom config.dpi value I have in my wezterm.lua file.

But as soon as the window is resized, the DPI reverts back to an automatically-calculated version and ignores my custom set DPI value.

To Reproduce

Simply add config.dpi = 110 in wezterm.lua, launch wezterm and resize the window by dragging a corner. See the DPI in the window immediately change.

Configuration

I have config.dpi = 110 in my wezterm.lua file.

I do this because I find the UI is too small with the auto-calculated DPI, so I like to set it manually.

Expected Behavior

In previous builds, rezising the window did not mess with the scaling, and did not ignore the config.dpi custom value in the config.

Logs

No response

Anything else?

This is loosely related to https://github.com/wez/wezterm/issues/4806 In #4806 @wez says that setting a DPI manually is not recommended, and to use font-size instead to make text more readable. I suppose its the same for this issue. So should the config.dpi option be removed?

ashleysommer commented 1 month ago

Note, clarifying the running environment. I'm suing Plasma 6.0.2 in Wayland mode, but wezterm is configured with config.enable_wayland = false so I guess its running in XWayland mode?