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: persist BrowserView background color when bounds offscreen #30510

Merged
merged 1 commit into from Aug 16, 2021

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Aug 12, 2021

Description of Change

Closes #29778.

Fixes an issue where background color would not be correctly applied to BrowserViews on Windows when either the x or y coordinate is negative (off-screen).

This was happening because view::Views was trying to paint the whole content bounds instead of the visible bounds, which caused issues because when part of the bounds are offscreen the compositor overrides and paints them white. This fixes that by painting the visible bounds.

Before:

Screen Shot 2021-08-12 at 12 38 30 PM

After:

Screen Shot 2021-08-12 at 12 38 47 PM

Tested with https://gist.github.com/712a2fde2757736c9dbf6c3e7e0aa18b.

Checklist

Release Notes

Notes: Fixed an issue where background color would not be correctly applied to BrowserViews on Windows when either the x or y coordinate is negative (off-screen).

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

It's great, very grateful👍 👍 👍 👍 👍 👍

@codebytere
Copy link
Member Author

failure is a flake

@codebytere codebytere merged commit fcce2b1 into main Aug 16, 2021
@codebytere codebytere deleted the fix-background-bv-windows branch August 16, 2021 10:27
@release-clerk
Copy link

release-clerk bot commented Aug 16, 2021

Release Notes Persisted

Fixed an issue where background color would not be correctly applied to BrowserViews on Windows when either the x or y coordinate is negative (off-screen).

@trop
Copy link
Contributor

trop bot commented Aug 16, 2021

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

@trop
Copy link
Contributor

trop bot commented Aug 16, 2021

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

@trop
Copy link
Contributor

trop bot commented Aug 16, 2021

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

@trop trop bot removed the in-flight/14-x-y label Aug 16, 2021
BlackHole1 pushed a commit to BlackHole1/electron that referenced this pull request Aug 30, 2021
andreasdj pushed a commit to andreasdj/electron that referenced this pull request Feb 4, 2022
zcbenz pushed a commit that referenced this pull request Mar 23, 2022
Reverting change introduced in PR: #30510

Co-authored-by: Andreas Johansson <aj3621@tobii.com>
trop bot pushed a commit that referenced this pull request Mar 23, 2022
trop bot pushed a commit that referenced this pull request Mar 23, 2022
codebytere pushed a commit that referenced this pull request Mar 23, 2022
Reverting change introduced in PR: #30510

Co-authored-by: Andreas Johansson <aj3621@tobii.com>
codebytere pushed a commit that referenced this pull request Mar 23, 2022
Reverting change introduced in PR: #30510

Co-authored-by: Andreas Johansson <aj3621@tobii.com>
bavulapati pushed a commit to bavulapati/electron that referenced this pull request Apr 29, 2022
…tron#32747)

Reverting change introduced in PR: electron#30510

Co-authored-by: Andreas Johansson <aj3621@tobii.com>
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
…tron#32747)

Reverting change introduced in PR: electron#30510

Co-authored-by: Andreas Johansson <aj3621@tobii.com>
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]: Setting the BackgroundColor to the BrowserView doesn't work on Windows
4 participants