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: fullscreen crashing with roundedCorners: false
#35421
Conversation
roundedCorners: false
Hey there! Quick question: wouldn't it be better to remove the offending |
@sircharlo i wish, but it's not just an attribute that can be removed. It's an option that defines how the window and its frame are constructed from the outset, and which can't really be changed without destroying and recreating the underlying NSWindow. |
Well, that sucks. I'll have to rethink that part of my app. I was hoping a behavior similar to other apps like VLC that manage this situation, but I guess this is a Chromium quirk. |
@sircharlo there's potential for overriding that behavior in Electron and allowing for fullscreen, but it'd be a bigger refactor and for now i'd just like to prevent it crashing. I can have a stab at the more complex fix but it might take a while |
Unrelated failure - merging. |
Release Notes Persisted
|
I have automatically backported this PR to "21-x-y", please check out #35454 |
I have automatically backported this PR to "20-x-y", please check out #35455 |
I have automatically backported this PR to "19-x-y", please check out #35456 |
Description of Change
Closes #35403.
Refs CL:1125099.
Fixes an issue where frameless windows with
roundedCorners: false
cannot enter fullscreen without crashing. This is happening because Chromium uses a customNativeWidgetMacNSWindowBorderlessFrame
when the NSWindow has aNSWindowStyleMaskBorderless
style mask, which is itself a subclass ofNSNextStepFrame
.NSNextStepFrame
does not implement any of the public or private methods required for fullscreen, and so it would crash with errors like:The cleanest solution for this would be to document this case in the
roundedCorners
option, and prevent the window from going fullscreen.Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where frameless windows with
roundedCorners: false
couldn't enter fullscreen without crashing.