-
Notifications
You must be signed in to change notification settings - Fork 15k
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: use default NSVisualEffectState enum case #24471
Conversation
I had to do some googling to figure this out, can we phrase this better in a way Electron devs would understand what changed. i.e. does this only impacts folks using vibrancy? |
@MarshallOfSound yes - it's invoked in |
I assume this is a visual change, what will users see differently now? |
@MarshallOfSound essentially - the vibrancy active state did not match that of the window. The default behavior of native macOS apps with vibrancy is to disable the vibrancy when the window is inactive, which makes it easier for the user to see the active app. Before this fix we forced it to be active all the time, which was visually confusing. Updated the notes to:
which i think should provide more clarity. |
Release Notes Persisted
|
I was unable to backport this PR to "8-x-y" cleanly; |
I have automatically backported this PR to "10-x-y", please check out #24532 |
I have automatically backported this PR to "9-x-y", please check out #24533 |
@codebytere has manually backported this PR to "8-x-y", please check out #24546 |
I understand the reasoning behind this change but can we not provide the facility to force vibrancy regardless of window state? I would like to keep the vibrancy when the window is not active. |
@greenimpala seems like a reasonable BrowserWindow option - happy to try and add it. |
@greenimpala popped up a fast PR, linked above |
@codebytere Great work, looks good :) |
Description of Change
Closes #16417.
In Apple documentation
NSVisualEffectState
is an enum with three options detailing how the material appearance should reflect window activity state. We were previously usingNSVisualEffectStateActive
, meaning that the backdrop would always appear active. This breaks from the default as specified in the first link, which isNSVisualEffectStateFollowsWindowActiveState
and means that the backdrop should automatically appear active when the window is active, and inactive when it is not. This thus changes our effect state to the more expected default.cc @miniak @zcbenz @jkleinsc
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where macOS window vibrancy active state did not always match the active state of the window.