New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Windows with vibrancy have a white background instead of being see-through #31461
Comments
@leolabs Is this happening with all vibrancy options? For example, if you try (Who knows about Swift or ObjC, but aleast in ElectronJS, that’s how I think |
Yes, I've checked it with other values as well and it doesn't work with any of them. If you run the fiddle on Electron <= 13 then the option works as expected. |
@leolabs hmm strange hopefully some devs can get on this soon then |
Same on electron@15.2.0 |
cc @samuelmaddock this broke between 14.0.0 and 14.0.1 and cffc1a2 seems likely |
I'm currently without a mac for a few weeks so I won't be able to provide changes for now. I think a fix for this in 15.x.y and up would be to add a condition for vibrancy to set the WebContents background to transparent here: electron/shell/browser/api/electron_api_browser_window.cc Lines 40 to 50 in a2d993c
Transparency in 14.x.y is implemented slightly differently due to changes with WebPreferences (#30777). I think we could align its logic to what's referenced in the code above.
In 14.0.0, the background color of a WebContents was always set to transparent due to a bug after a Chromium upgrade iirc. |
I don't have any experience building Electron from source, but if there's anything I can do to help, please let me know :) |
Preflight Checklist
Electron Version
14.0.0
What operating system are you using?
macOS
Operating System Version
macOS Big Sur 11.6
What arch are you using?
x64
Last Known Working Electron version
13.5.2
Expected Behavior
When I set the
vibrancy
option on a new BrowserWindow (e.g. to "popover"), the window's background should reflect this.Actual Behavior
The window's background stays white. Adding
transparent: true
to the options makes the background work as expected but removes the title bar.Testcase Gist URL
https://gist.github.com/bbc333443f77ce4a6061d43eddf67fd4
Additional Information
This might be related to #30993
The text was updated successfully, but these errors were encountered: