Skip to content
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

fix: BrowserWindow transparency not working #30136

Merged
merged 1 commit into from
Jul 15, 2021
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jul 14, 2021

Description of Change

Closes #30082.

Fixes an issue where BrowserWindows would not properly honor transparency: true or a backgroundColor being set in their constructor options. This happened as a result of this CL rolled into Electron via #29751. The new method SetPageBaseBackgroundColor set the default content background color - i.e, the color that would appear behind the content unless the content overrode it. What then happened was that when we changed our logic to call this method, it was eventually overridden by Blink, and so would show as transparent or with the supplied color for a flash and then revert to white. We fix this by directly calling the background color method in RenderWidgetHostViewBase.

Tested with https://gist.github.com/b52f026c763057f97f745fade82758fd.

Checklist

Release Notes

Notes: Fixed an issue where BrowserWindows would not properly honor transparency: true or a backgroundColor being set in their constructor options.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/14-x-y labels Jul 14, 2021
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jul 14, 2021
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to break fairly frequently... is there some way we could test this? With desktopCapturer perhaps? 😬

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jul 15, 2021
@codebytere
Copy link
Member Author

Failure not germane.

@codebytere codebytere merged commit 1bb689e into main Jul 15, 2021
@codebytere codebytere deleted the macos-broken-transparency branch July 15, 2021 20:18
@release-clerk
Copy link

release-clerk bot commented Jul 15, 2021

Release Notes Persisted

Fixed an issue where BrowserWindows would not properly honor transparency: true or a backgroundColor being set in their constructor options.

@trop
Copy link
Contributor

trop bot commented Jul 15, 2021

I have automatically backported this PR to "14-x-y", please check out #30159

@gr0uch
Copy link

gr0uch commented Aug 3, 2021

This appears to still be broken in latest v14 beta and v15 alpha versions :(

Works on current v13 stable though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Transparency/backgroundColor no longer working
7 participants