Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphics stop working in tabs eventually when using wezterm connect #3366

Closed
stvhay opened this issue Mar 25, 2023 · 7 comments
Closed

graphics stop working in tabs eventually when using wezterm connect #3366

stvhay opened this issue Mar 25, 2023 · 7 comments
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.

Comments

@stvhay
Copy link

stvhay commented Mar 25, 2023

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

macOS

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

No response

WezTerm version

wezterm 20230323-214328-bc7acc18

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

A fresh connect session logs in like this:

image

But eventually if the session persists long enough I start getting this on new tabs:

image

To Reproduce

Hard to reproduce but I guess if I were to describe the steps:

  1. wezterm connect to somewhere
  2. do a bunch of 'stuff'
  3. make a new tab
  4. sometimes the new tab loses graphics

Configuration

local wezterm = require 'wezterm'
local config = {}

if wezterm.config_builder then
    config = wezterm.config_builder()
end

config.keys = {
    -- Make Option-Left equivalent to Alt-b which many line editors interpret as backward-word
    { key="LeftArrow", mods="OPT", action=wezterm.action{SendString="\x1bb"} },
    -- Make Option-Right equivalent to Alt-f; forward-word
    { key="RightArrow", mods="OPT", action=wezterm.action{SendString="\x1bf"} },
}

config.font = wezterm.font 'Hack Nerd Font Mono'
config.color_scheme = 'TerminixDark (Gogh)'

return config

Expected Behavior

making new tabs will continue to show the images.

Logs

let me know what logs you need if any to help with this.

Anything else?

when this behavior happens, i wanted to note that making a new window seems to reset stuff and what is in the window looks normal, as well as new tabs in the new window.

@stvhay stvhay added the bug Something isn't working label Mar 25, 2023
@wez
Copy link
Owner

wez commented Mar 25, 2023

FWIW, I think this may be the same underlying issue with neofetch as #3357

@stvhay
Copy link
Author

stvhay commented Mar 26, 2023

i should be able to check this. might take me a minute.

@stvhay
Copy link
Author

stvhay commented Mar 26, 2023

To reproduce:

  1. wezterm connect xxxyy
  2. resize window (horizontally or vertically--I made bigger)
  3. open a tab

@wez
Copy link
Owner

wez commented Mar 26, 2023

Confirmed, thanks!

wez added a commit that referenced this issue Mar 26, 2023
wez added a commit that referenced this issue Mar 26, 2023
Three issues:

* The initial connect would leave the dpi assigned to 0, resulting
  in incorrect scaling when using imgcat until the window was resized
  and the correct dpi was passed up.
* On resize, we'd only compare the row/col count and not notice changes
  in pixel dimensions/dpi
* On the server side, when processing a resize and recomputing
  the tab size, we would omit the pixel dimensions and leave
  the resulting tabs and panes with 0 dimensions, breaking imgcat
  because it thought the window was 0x0.

refs: #3366
@wez
Copy link
Owner

wez commented Mar 26, 2023

This should be resolved now in main.

It typically takes about an hour before commits are available as nightly builds for all platforms. Linux builds are the fastest to build and are often available within about 20 minutes. Windows and macOS builds take a bit longer.

Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs.

If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a .dmg file on macOS, a .zip file on Windows and an .AppImage file on Linux) that can be run without permanently installing or replacing an existing package, and can then simply be deleted once you no longer need them.

If you are eager and can build from source then you may be able to try this out more quickly.

@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Mar 26, 2023
@stvhay
Copy link
Author

stvhay commented Mar 26, 2023

confirmed fixed. thank you

@wez wez closed this as completed Mar 26, 2023
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.
Projects
None yet
Development

No branches or pull requests

2 participants