codebytere

#47664: fix: fullscreen for windows without rounded corners

Merged
Created: Jul 4, 2025, 3:19:46 AM
Merged: Jul 8, 2025, 4:14:15 AM
4 comments
Target: main

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

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

36-x-y
Merged
PR Number
#47683
Merged At
Jul 8, 2025, 8:21:41 AM
Released In
v36.7.1
Release Date
Jul 9, 2025, 11:03:16 AM
37-x-y
Merged
PR Number
#47682
Merged At
Jul 8, 2025, 8:22:53 AM
Released In
v37.2.1
Release Date
Jul 9, 2025, 11:02:22 AM
38-x-y
Merged
PR Number
#47681
Merged At
Jul 8, 2025, 8:21:13 AM
Released In
v38.0.0-alpha.5
Release Date
Jul 10, 2025, 8:31:24 AM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

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