#47664: fix: fullscreen for windows without rounded corners
Description of Change
Closes #47579.
Fixes an issue where child windows could crash if they were opened while the parent is fullscreened and have roundedCorners
set to false
.
This was happening because Chromium uses a custom NativeWidgetMacNSWindowBorderlessFrame
when the NSWindow has a NSWindowStyleMaskBorderless
style mask, which is itself a subclass of NSNextStepFrame
. NSNextStepFrame
does not implement any of the public or private methods required for fullscreen, and so it would crash. We initially handled this by preventing windows from going fullscreen in that case, but a better solution is to temporarily remove the NSWindowStyleMaskBorderless
style mask when going fullscreen and then restore it afterwards.
Checklist
- PR description included and stakeholders cc'd
-
npm test
passes - tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed an issue where child windows could crash if they were opened from a fullscreen parent and have roundedCorners
set to false
.
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