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: BrowserView background color in webContents #33435

Merged
merged 3 commits into from Mar 28, 2022
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Mar 24, 2022

Description of Change

Closes #33374.

Fixes an issue where backgroundColor would not be applied correctly to a BrowserView on Windows. This was happening because the color was being set on the RenderWidgetHostView in webContents, but the color was missing from webPreferences and so was transparent every time. We need to ensure the color is set properly on the window as well as the contents every time setBackgroundColor is called, as is done on BrowserWindow.

Checklist

Release Notes

Notes: Fixed an issue with background colors being improperly applied to BrowserViews on Windows.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 24, 2022
@codebytere codebytere added target/16-x-y semver/patch backwards-compatible bug fixes and removed new-pr 🌱 PR opened in the last 24 hours labels Mar 24, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 24, 2022
@codebytere codebytere requested review from VerteDinde and removed request for zcbenz March 24, 2022 14:27
@codebytere codebytere changed the title chore: fix BrowserView background color in webContents fix: BrowserView background color in webContents Mar 24, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 25, 2022
@jkleinsc jkleinsc merged commit 1153a5c into main Mar 28, 2022
@jkleinsc jkleinsc deleted the fix-browserview-bg branch March 28, 2022 16:47
@release-clerk
Copy link

release-clerk bot commented Mar 28, 2022

Release Notes Persisted

Fixed an issue with background colors being improperly applied to BrowserViews on Windows.

@trop
Copy link
Contributor

trop bot commented Mar 28, 2022

I was unable to backport this PR to "16-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Mar 28, 2022

I was unable to backport this PR to "17-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Mar 28, 2022

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

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

@codebytere has manually backported this PR to "17-x-y", please check out #33545

@trop
Copy link
Contributor

trop bot commented Mar 31, 2022

@codebytere has manually backported this PR to "16-x-y", please check out #33546

bavulapati pushed a commit to bavulapati/electron that referenced this pull request Apr 29, 2022
* chore: fix BrowserView background color in webContents

* disable screen capture test on linux

* spec: fix platform failure condition
@miniak
Copy link
Contributor

miniak commented Jun 9, 2022

@codebytere this fix regressed #31722

@trop trop bot removed the in-flight/17-x-y label Jun 21, 2022
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* chore: fix BrowserView background color in webContents

* disable screen capture test on linux

* spec: fix platform failure condition
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]: BrowserView setBackgroundColor does not work on windows
5 participants