Skip to content

fix: vibrancy window border #46648

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clavin
Copy link
Member

@clavin clavin commented Apr 16, 2025

Description of Change

Chromium sets some properties on NSWindow when we initialize a widget with support for translucency (added in #46392). This causes undesirable visual effects, such as the loss of the window border (see #46586).

The easiest fix is to patch out the unintended Chromium code. We set both properties ourselves when appropriate.

Fixes #46586
Ref: #46392

Checklist

Release Notes

Notes: Fixed the border style of windows with vibrancy on macOS.

@clavin clavin added semver/patch backwards-compatible bug fixes target/35-x-y PR should also be added to the "35-x-y" branch. target/36-x-y PR should also be added to the "36-x-y" branch. labels Apr 16, 2025
@clavin clavin requested a review from a team as a code owner April 16, 2025 03:39
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Apr 16, 2025
@clavin
Copy link
Member Author

clavin commented Apr 16, 2025

Worth mentioning there's an alternate solution using WidgetDelegate::OnWidgetInitialized to undo what is done by the Chromium code in this patch. It would let us avoid the patch, but we'd still have an invisible "dependency" on this Chromium code and the result would be a lot less clean.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Apr 17, 2025
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.

@clavin personally i'd rather the non-patch route with appropriate commenting - our patches have been ballooning lately and there's no clear path for removal here. We can also try to talk to upstream about it.

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 target/35-x-y PR should also be added to the "35-x-y" branch. target/36-x-y PR should also be added to the "36-x-y" branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting vibrancy removes window border style
3 participants