Keep window opacity constant when the window loses focus - #180
Conversation
…s focus changes The tint overlay (mirroring Ghostty's TerminalGlassView desaturation) made an unfocused translucent window read as far more opaque — 0.85 alpha on dark themes. Keeping the glass identical whether or not the window is key looks better; the doc comment now records the deliberate divergence from Ghostty so it isn't reintroduced.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughWindow appearance removes inactive-glass tint overlay state and key-window synchronization. Delegate key-state callbacks now only forward notifications, while glass configuration uses style, tint, opacity, and corner radius. ChangesWindow appearance synchronization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Window-state benchmark
Reported value is the median of 3×10s windows per state (splitting the window and taking the median keeps one co-scheduled spike from skewing a state); CPU % is the process CPU-time delta over a window. Runs land on different shared runners, so treat small deltas as noise — 🔺/🔻 marks changes ≥25% that also clear the metric's absolute noise floor (CPU % ≥0.5, Memory (RSS MB) ≥25, CPU ms/s ≥5, Wakeups/s ≥50); CPU deltas off a noise-dominated baseline aren't flagged (CPU % baseline ≥1.5, CPU ms/s baseline ≥15). Flagged changes add the |
Why
With liquid glass enabled, unfocusing the window faded in a desaturation tint over the glass (mirroring Ghostty's
TerminalGlassView) — at 0.85 alpha on dark themes, a translucent window read as near-opaque the moment it lost focus. Keeping the appearance identical focused/unfocused looks better.What
tintOverlayand itstintProperties(0.35 light / 0.85 dark constants) fromMactermGlassView, plus thebackgroundOpacityscaling that existed only to bound the tint.WindowAppearance.syncKeyStatusand itswindowDidBecomeKey/windowDidResignKeycall sites (delegate forwarding unchanged).NSColor.luminance/isLightColor/adjustingSaturationhelpers.MactermGlassView's doc comment now records the deliberate divergence from Ghostty so the tint isn't reintroduced as a "missing feature".The non-glass paths never varied with focus, so this only affects the macOS 26 glass appearance. Any residual inactive treatment the system applies to
NSGlassEffectViewitself is outside our control.Testing
mise run format/lint/testall green.🤖 Generated with Claude Code
Summary by CodeRabbit