Skip to content

Fix glass effect rendering as solid gray on macOS 27 Beta (Issue #577)#580

Open
lakshitsoni26 wants to merge 1 commit into
alienator88:mainfrom
lakshitsoni26:fix-issue-577-glass-effect
Open

Fix glass effect rendering as solid gray on macOS 27 Beta (Issue #577)#580
lakshitsoni26 wants to merge 1 commit into
alienator88:mainfrom
lakshitsoni26:fix-issue-577-glass-effect

Conversation

@lakshitsoni26

Copy link
Copy Markdown

Summary

Resolves #577

This PR addresses a critical rendering regression introduced in macOS 27 Beta, where the Clear glass effect setting fails to composite correctly, resulting in the sidebar rendering as an opaque #2d2e33 color block instead of the expected translucent blur.

Root Cause Analysis & Technical Approach

The root architectural frames (SettingsWindow and MainWindow) are explicitly painted with a solid primaryBG color (#1a1b1f). In the latest beta compositor, the custom .glassEffect(.clear) modifier provided by AlinFoundation is 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 ifGlassAvailableMain and ifGlassAvailableSidebar to utilize Apple's native NSVisualEffectView when the Clear effect 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 the Regular mode.

Developer Checklist

  • Investigated and identified the compositing failure on macOS 27 Beta.
  • Swapped the failing .glassEffect modifier with a robust, native NSVisualEffectView implementation for the Clear state.
  • Applied .behindWindow blending to explicitly override the solid root window backgrounds.
  • Verified that the Regular glass effect mode remains fully intact and unaffected.
  • Validated flawless local compilation and UI rendering.

Proof of Rendering:
Screenshot 2026-06-11 at 5 48 29 PM
Screenshot 2026-06-11 at 5 48 35 PM

@lakshitsoni26

Copy link
Copy Markdown
Author

i can make this fully transparent also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Glass effect renders incorrectly on macOS 27 Beta

1 participant