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

feat: add win.getBackgroundColor() for macOS #21448

Merged
merged 18 commits into from
Dec 13, 2019

Conversation

vbennich
Copy link
Contributor

@vbennich vbennich commented Dec 10, 2019

Description of Change

Added a win.getBackgroundColor() to get the backgroundColor for a BrowserWindow in MacOS. The value could be set by win.setBackgroundColor(color), and it would be logical to have a getter. Inspired by #20203.

Checklist

Release Notes

Notes: Added win.getBackgroundColor() for BrowserWindow on macOS.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Dec 10, 2019
@welcome
Copy link

welcome bot commented Dec 10, 2019

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@vbennich
Copy link
Contributor Author

I have unintentionally added some code that tries (miserably) to get the backgroundColor on Linux and breaks the build for Linux. I will triangulate and remove that code and update the pull request to make it buildable on all platforms.

@codebytere
Copy link
Member

codebytere commented Dec 10, 2019

@vbennich it looks like some git debris got left in there too - once that's removed and the checks are green just @ me and i'll give this a review.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Dec 11, 2019
@vbennich
Copy link
Contributor Author

Seems like it passes all checks and it works for now. @codebytere please have a look at this, and thank you for your help :)

Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

Looking good so far - just a few things to get this moving forward :)

shell/browser/native_window_mac.mm Show resolved Hide resolved
shell/browser/api/atom_api_top_level_window.cc Outdated Show resolved Hide resolved
spec-main/api-browser-window-spec.ts Show resolved Hide resolved
@codebytere codebytere changed the title feat: add win.getBackgroundColor() for MacOs feat: add win.getBackgroundColor() for macOS Dec 11, 2019
@vbennich
Copy link
Contributor Author

I don't know why the electron test failed for win-ia32-testing-pr. Will try to commit for another build. The log where the error occurred:

[01:15:12] ok 267 BrowserWindow module BrowserWindow.openDevTools() does not crash for frameless window [01:15:12] ok 268 BrowserWindow module BrowserWindow.fromBrowserView(browserView) returns the window with the browserView [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](118, 3), LocalSurfaceId(2, 1, A1B1...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](96, 3), LocalSurfaceId(2, 1, FCD6...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](92, 3), LocalSurfaceId(2, 1, 8A95...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](80, 9), LocalSurfaceId(2, 1, 53AF...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](127, 3), LocalSurfaceId(3, 1, A8E0...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](76, 3), LocalSurfaceId(2, 1, 47CD...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](84, 3), LocalSurfaceId(2, 1, AAE8...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](74, 3), LocalSurfaceId(2, 1, DB1C...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](82, 3), LocalSurfaceId(2, 1, 8711...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](90, 3), LocalSurfaceId(2, 1, 95DA...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](124, 3), LocalSurfaceId(3, 1, 3078...)) [01:15:15] [3784:1211/165624.471:ERROR:surface_manager.cc(438)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](101, 3), LocalSurfaceId(2, 1, 61D2...)) [01:15:23] ✗ Electron tests failed with code 0xc0000374. [01:15:23] error Command failed with exit code 1. [01:15:23] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [01:15:23] Command exited with code 1

@codebytere
Copy link
Member

@vbennich this looks like a flake and not a failure caused by your change; i'll rerun!

@codebytere codebytere merged commit cf833a7 into electron:master Dec 13, 2019
@welcome
Copy link

welcome bot commented Dec 13, 2019

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Dec 13, 2019

Release Notes Persisted

Added win.getBackgroundColor() for BrowserWindow on macOS.

@vbennich vbennich deleted the feature/backgroundColor branch April 11, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants