-
Notifications
You must be signed in to change notification settings - Fork 689
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
On the second display quick terminal view is scrambled until click or type event #2731
Comments
I would normally make this a discussion but this looks like something somewhat familiar. This looks like our Metal textures are... wrong. Either wrong scale, or our x/y is wrong, or something. It's not something I've ever seen in a production build but it's something I've seen while working on the font subsystem. I haven't tried to reproduce this yet. Are your two displays a different content scale perhaps? |
They are:
I would consider this bug minor if it were "recovering" without any additional input. But it is annoying to have on a quick terminal, as I often use it for something ad hoc and then peek for the result over time. |
I can not reproduce it anymore. Here is the current context:
|
This happened to me as well a few times today, I haven't found a way to reproduce it yet. |
Hi, if it helps I'm able to reproduce a similar glitch. Steps to reproduceI start with a two tabs terminal on the built-in screen (which is hDPI): Then I drag the tab out to my external monitor: ghostty_bug.movSetup
PS: Great app by the way. Many thanks! |
This might be a useful bit of the puzzle. I have a primary high res screen (laptop monitor) and 2 external low res displays. Quick terminal seems to work by initialising the terminal off screen and animating it down onto the screen. When monitors are arranged vertically and you call up the quick terminal on the lower screen, you see it appear on the upper screen first. This bug happens in two scenarios:
The large swcreens are low res, small screen high res.
Assuming that the issue here is caused by moving the terminal between screens of a different resolution, might this be fixed by causing the terminal to be initialised for the resolution of the screen that it's going to animate onto, rather than the screen that it first appears on? |
This is good insight thank you. As I noted in my first response my immediate intuition was a scale issue, since that has caused bugs that looked like this in the past. Right now the terminal itself is unaware its being animated. The animation happens much higher level (at the windowing level) and we rely on macOS events to notify us the screen changed for DPI changes. That's the same notification we use when you say... drag a window from one screen to another. I think one of my first questions here if your assessment is true is why that notification isn't being triggered automatically during (or even after) the animation. And if it's not being triggered, one fix is simply to force it ourselves. "Force it" is roughly your suggestion, though you suggest doing it at the beginning of the animation, which also is fine. I think the "when" depends on what macOS is doing with notifications. i.e. if they're sending a notification but its the wrong screen because its just prior to animation end, then doing it at the beginning won't solve the issue. Etc etc. If anyone wants to take a look at this, the callback should be somewhere in |
Related to #2731 I'm not fully sure if this will fix this issue since I can't reproduce it but I don't see a downside to doing this and it might fix it.
Related to #2731 I'm not fully sure if this will fix this issue since I can't reproduce it but I don't see a downside to doing this and it might fix it.
I just merged #3091. I'm unable to reproduce this (I guess both my displays are too similar and even changing resolution its triggering it), but I suspect it might be something like the fix I just merged. Can anyone update Ghostty and verify if this is resolved? The new build should come out in ~30 minutes, just check the SHA in the about window that it is after #3091 merged! |
I can still reproduce the issue on build b1756b93. I've requested access to http://ghostty.org/docs/install/build, if I get time I'll make a build and see if I can debug the issue and get any more insight. FWIW since the terminal re-renders correctly as soon as I type anything this is a mild eyesore but not stopping me from using Quick Terminal. |
Alright thanks. Yeah, it's curious it fixes on input. There's clearly some event we're missing to redraw or get the correct content scale and I haven't figured it out yet. |
I've just raised #4483 but TBH I think it might be heavily related. If there's anything useful in that discussion item then great otherwise we can close that one I think? |
I raised #4197 which looks similar- I don't see the same graphical corruption but the font spacing gets very weird. |
Building upon the repro steps of @BernieSumption, I consistently reproduce this with my desk setup, simply by dragging Ghostty between a hi-dpi monitor and a "standard" monitor. I have an ultra wide monitor, with my MacBook Pro M1 off to the side. The MacBook is set to the default hi-dpi mode (1728 x 1117) which is 254ppi. Whereas my ultra wide monitor is a QHD (3440x1440) which is 109ppi. And as mentioned, clicking/scrolling/etc causes it to redraw and fix itself. |
I have to report the same behavior on my setup (m3 laptop+external screen). What I can add is that sometimes when the window is dragged across the screens ghostty simply crashes. What it happens is that the window size (char wise) is increased by a sizeable amount, say 50% when moving from the external monitor (bigger but lower res) to the internal laptop monitor. Resizing seems to happen pretty consistently on my side, so if you have suggestions I can try to collect more info. |
I experienced this issue yesterday. I was working on my MacBook Pro laptop screen, closed the laptop, and plugged it into my external display (5k). When the screen came up the terminal was scrambled. If you interact with the terminal, it fixes itself.
Otherwise, the terminal has been swift and solid. 🙌 |
I also have this issue, still in 1.1. IT happens both on the quick terminal and the normal terminal. i have 2 external 2k monitors and the laptop screen. I've only seen it on the external monitors. The best way to reproduce is opening/closing the quick terminal a few times or switching screen focus and opening it. any input to the terminal fixes it. this is with an m1 max laptop with macos 15.2 |
I have the same issue with today's tip based on 38908e0. This is moving to the mac's built-in Retina display. On the right of this video is a 1440p standard resolution display. Both at 120hz. M4 Pro Mac, in case that makes a difference for Metal? Screen.Recording.2025-02-19.at.12.30.02.720p.mov |
In my case this happens when I put my mac to sleep and wake up. I am not sure if this will help to reproduce it. |
I don't know how to explain it clearly, and a video is better than a thousand words in this case.
ghostty-bug-20241119.mov
I have seen it on the main window as well, however I was not able to reproduce it stable.
Steps to reproduce
Ghostty version and config
The text was updated successfully, but these errors were encountered: