Fix glass effect rendering as solid gray on macOS 27 Beta (Issue #577)#580
Open
lakshitsoni26 wants to merge 1 commit into
Open
Fix glass effect rendering as solid gray on macOS 27 Beta (Issue #577)#580lakshitsoni26 wants to merge 1 commit into
lakshitsoni26 wants to merge 1 commit into
Conversation
Author
|
i can make this fully transparent also |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #577
This PR addresses a critical rendering regression introduced in macOS 27 Beta, where the
Clearglass effect setting fails to composite correctly, resulting in the sidebar rendering as an opaque#2d2e33color block instead of the expected translucent blur.Root Cause Analysis & Technical Approach
The root architectural frames (
SettingsWindowandMainWindow) are explicitly painted with a solidprimaryBGcolor (#1a1b1f). In the latest beta compositor, the custom.glassEffect(.clear)modifier provided byAlinFoundationis unable to pierce through this underlying solid SwiftUI background layer. Consequently, it only blurs the immediate solid background rather than the user's desktop.To resolve this at the compositing level, I have refactored both
ifGlassAvailableMainandifGlassAvailableSidebarto utilize Apple's nativeNSVisualEffectViewwhen theCleareffect is active. By explicitly setting the blending mode to.behindWindow, we instruct the macOS WindowServer to punch a hole through all underlying SwiftUI backgrounds and blur the physical desktop wallpaper directly behind the application frame. This safely and completely restores the native translucent appearance without causing side effects on theRegularmode.Developer Checklist
.glassEffectmodifier with a robust, nativeNSVisualEffectViewimplementation for theClearstate..behindWindowblending to explicitly override the solid root window backgrounds.Regularglass effect mode remains fully intact and unaffected.Proof of Rendering:

