Repository navigation
quick terminal not properly resizing between monitors #12348
Replies: 2 comments 10 replies
|
Did you resize the quick terminal before disconnection the monitor? I tried with the default config, and the steps you described, but I couldn’t reproduce. |
|
I think I found the cause. It's the per-display frame cache from the #8713 fix (QuickTerminalScreenStateCache). DisplayEntry.isValid keeps a saved window frame valid as long as the current screen is the same size or larger than when it was cached:
So once a display's resolution changes, via disconnecting or reconnecting at a different mode after travel, the stale frame is still considered valid and gets restored instead of recomputing from quick-terminal-size. That lines up with the "uses the height it had before" symptom, and because the cache is persisted it survives a restart. (I ran into the opposite direction: on reconnecting an external monitor the quick terminal comes back at a partial width.) On the "did you resize first?" question: a manual resize isn't strictly required, but it makes it visible, since that's what makes the cached frame diverge from the default size for that screen. I have a fix that only reuses a cached frame when the screen geometry matches exactly (scale + size), otherwise it falls back to the configured size. New unit tests plus the full macOS suite pass: https://github.com/quinnypig/ghostty/tree/fix/quick-terminal-stale-frame-on-display-change Happy to open a PR if this gets promoted to an issue. |
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
When activating the quick terminal while having te MBP connected to an external screen it uses the correct hight of the external screen. When I disconnect the display and activate the quick terminal, it will overflow the screen at the top and bottom as it uses the hight it had before. Even restarting Ghostty does not fix this state.
Regression from: #8713
Expected Behavior
The quick terminal has the correct size for the monitor on which it is shown.
Actual Behavior
The quick terminal overflows the screen. Even restarting ghostty will not fix it.
Reproduction Steps
Ghostty Logs
Ghostty Version
OS Version Information
macOS Tahoe 26.3.1
(Linux only) Display Server
None
(Linux only) Desktop Environment/Window Manager
No response
Minimal Ghostty Configuration
Additional Relevant Configuration
No response
I acknowledge that:
```) on separate lines.All reactions