#55606: fix: honor hasShadow: false and focusable for windows in app shims
Description of Change
new BrowserWindow({ appShim, frame: false, transparent: true, hasShadow: false }) still got the system shadow, because NativeWindowMacRemote::SetHasShadow only stores the value. This sets ShadowType::kNone on the widget at creation, which NativeWidgetMacNSWindowHost sends to the shim as has_window_server_shadow = false. The option is read above the app_shim lookup because reading options can run JavaScript that disconnects the shim.
focusable was ignored the same way. focusable: false now sets Activatable::kNo at creation.
Checked on a local build at Chromium 158: a focusable: false window rejects typing and doesn't take focus from the frontmost app, setFocusable(true) makes it focusable, and the new spec passes. Not run on 44-x-y.
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, past tense, and no longer than 80 characters.
Release Notes
Notes: Fixed hasShadow: false and focusable being ignored in macOS app shims.
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron