Repository navigation
fix(macos): keep the translucent window surface on by default - #1790
Merged
Merged
Conversation
The window was created with the vibrancy material and then had the opaque host colour painted over it immediately after creation, because the post-creation background paint did not know about the surface choice. Turning translucency on therefore looked inert even after a restart. That paint now skips a translucent macOS window, the same way the background IPC and the theme path already did. Translucency is also the shipped look again: an absent preference means the material, only an explicit `false` opts into the cheaper opaque surface, and the stored flag defaults to translucent so a boot that cannot read settings still paints the window the user expects. Docs and tests follow the corrected default (ADR 0332, D667).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes two problems in the setting shipped by #1788:
createWindowpainted the host background right after
new BrowserWindow, and that calldid not know about the surface choice — so the vibrancy window was created
and then immediately covered with an opaque colour. The post-creation paint
now skips a translucent macOS window, the same way the
window.setBackgroundColorIPC and the theme path already did.
sidebarmaterial; only an explicitfalseopts into the opaque surface.The stored flag and the Settings switch follow that (
!== false), soexisting installs get the shipped look back without touching settings.
The opaque surface stays available as the opt-out for the GPU cost of the
material (#1064): with the switch off, the window leaves WindowServer's
per-frame recomposition path and the
windowAppearance.backgroundColorof aplugin theme applies on macOS.
Verification
apps/desktoptypecheck: passbiome lint(repo config): 125 files, no findingsapps/desktopnode --test: 4144 tests, 4141 pass, 0 fail (3 skipped)packages/sharedvitest: 1280 pass;packages/i18nvitest: 30 passapps/desktop/test/macos-window-translucency.test.mjsnow also asserts thatthe post-creation background paint skips a translucent macOS window, which is
the regression this PR fixes.
Not run:
verify:ui:*(no Electron instance was started; the surface contractis covered by the unit tests above).
Docs: ADR 0332 (title, decision, consequences, alternatives), ADR 0248,
ADR index,
04-ux/06-settings-ia.md,04-ux/08-component-spec.md,04-ux/07-ui-design-system.md, plugin permissions matrix, decisions log (D667).