Digging deeper, this seems like a weird issue:
- In Big Sur,
- before the window has ever been Visible (e.g. .Show() has not yet been called)
- if you set NSWindow.AlphaValue to a value below 1.0
- then Vibrancy is enabled for the HTMLViewer on the Window
- and remains on, even if you set NWSindow.AlphaValue back to 1.0
If, however, you make the window visible first, it’s possible to change the AlphaValue later on, and this does not seem to trigger Vibrancy.
Unfortunately, I was using this feature to make a nice animated fade-in of a window:
- create window (visible=false)
- load the HTMLViewer
- set alpha to zero
- window.show
- animate window.alpha from 0 to 1
Update: I found a workaround, which is pretty hack-y, but does work:
- Create the window (visible=false)
- Move the window far offscreen (top = -30000)
- show the window
- set the window alpha to 0.0
- hide the window
At this point, the window will function normally, and you can show and hide it and animate the Alpha value without trigggering unwanted Vibrancy.