-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
ghostly text artifacts after clearing screen on macos with transparency enabled #310
Comments
Seems to be specific to macOS. Neither Windows nor Linux have a similar issue. This also appears whether Metal (via EGL) is used or the older CGL is used (you can use |
Did you manage to recreate it? Do you think it's worth looking into? |
Yeah, I can reproduce it. I'm not sure what can be done about it; wezterm does clear the sufaces (because otherwise we'd have the same problem on all systems, with or without opacity), so I'm not sure how to make macos properly respect that. |
Here are some issues which might be related (a couple added by me): It might be a ..it seem you build it from scratch ? |
Not 100% sure that this is it, but it seems much less likely that artifacts will appear in conjunction with transparency when the window shadow effect is disabled; I didn't see the ghosting with this disabled, but I sometimes dididn't see it with it enabled, so I'm not sure that we have a 100% reliable reproduction, and thus am not sure that this is a fix. I found mention of disabling the shadow in some example code on stackoverflow when I was first researching this, but it wasn't supplied with an explanation. Perhaps this is why? Longer term we might want to be smarter about turning off the shadow only when the opacity is != 1.0, but at the moment the window layer can't see the config, so let's just default it off for the moment until we see if it does the trick. refs: #310
It seems like turning off the shadow effect around the window helps with this; I pushed a commit with that and would appreciate you feedback on whether it does the trick for you! While I didn't see the ghosting in that commit, I sometimes didn't see it without that change, so I don't know if I had a guaranteed repro or whether it really worked. |
May ultimately be this same root cause: https://stackoverflow.com/questions/20744936/drawing-to-transparent-destination-causes-drawing-artifacts/20746261#20746261 and the "best" fix may be to invalidate the shadow after a resize or whatever the trigger circumstance may be |
Sounds promising! Looking forward to try it. Do you know if it would be possible to trigger a new build after each commit, so we could test nightly faster? |
It does get built on each commit: you can download the mac build from that commit here: https://github.com/wez/wezterm/runs/1323247067 |
(dark mode screenshots due to Dark Reader browser extension!) |
Great, maybe you could add that link to the web page (if it's not there). Do you know when it's available on brew? |
the "nightly" download will update within the next hour, if that last build didn't already pick it up: |
I think that fixed it! No more ghosts! Nice! |
Doing that resizing, reminded me off the #138 issue. If you can fix that, your terminal is in my humble opinion superior to all other terminals! |
This one invalidates the shadow when we invalidate the window, so we should get to keep the shadow and lose the ghosts. refs: #310
I pushed an alternative resolution that should let us keep the default shadow. Seemed to work for me with limited testing. If that doesn't also work for you we can always go back to turning off the shadow. |
Cool, will check it out once the build is ready. Btw, not sure, but there might be a slight performance increase with shadows off and a cleaner look..? Maybe make it an setting? |
Ok, i've tested the latest version now, and i only saw the ghost effect a couple of times and then it went away fast as i started typing ..but it did seem ALOT more slugish the the previous version and does some weird text scaling stuff when resizing. I did a comparison between the previous no-shadows version and the latest and the no-shadows version is ALOT faster when resizing and in general use. I would much prefer the no-shadow version. |
OK, that's sold me. I'll revert that last commit a little later this evening. |
it is a little bothering me that WezTerm doesn't give me a drop shadow for the Window. Would it be okay if I make it only disable shadow when transparency is set to non 1.0? |
Evidence: * #310 (comment) * #2669 (comment) * #2669 (comment) seems to suggest that window shadows hurt performance, so add a way to disable them independently from window opacity. You may use: ``` config.window_decorations = "TITLE|RESIZE|MACOS_FORCE_DISABLE_SHADOW" ``` for this. refs: #2669
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. |
Describe the bug
When
window_background_opacity
is less than 1.0, e.g.0.3
, and i list some text in the terminal, then resize the window, sometimes the text (buffer?) is not cleared. I also noticed this some times when using the Kitty terminal some time ago. This might be an error with some macOS spesific code.I noticed when i open Wezterm from the terminal i get this ERROR message, not sure if it has to do with anything but i thought i mention it.
Environment (please complete the following information):
To Reproduce
window_background_opacity=0.3
ls
some text in the terminal windowCtrl-L
Configuration
Only set
window_background_opacity=0.3
Expected behavior
I would expect the text to always clear on
Ctrl-L
Screenshots
The text was updated successfully, but these errors were encountered: