mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: fullscreen crashing with roundedCorners: false (#35454)
fix: fullscreen crashing with roundedCorners Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -299,7 +299,7 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
|
||||
bool rounded_corner = true;
|
||||
options.Get(options::kRoundedCorners, &rounded_corner);
|
||||
if (!rounded_corner && !has_frame())
|
||||
styleMask = 0;
|
||||
styleMask = NSWindowStyleMaskBorderless;
|
||||
|
||||
if (minimizable)
|
||||
styleMask |= NSWindowStyleMaskMiniaturizable;
|
||||
@@ -691,6 +691,9 @@ bool NativeWindowMac::HandleDeferredClose() {
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetFullScreen(bool fullscreen) {
|
||||
if (!has_frame() && !HasStyleMask(NSWindowStyleMaskTitled))
|
||||
return;
|
||||
|
||||
// [NSWindow -toggleFullScreen] is an asynchronous operation, which means
|
||||
// that it's possible to call it while a fullscreen transition is currently
|
||||
// in process. This can create weird behavior (incl. phantom windows),
|
||||
|
||||
Reference in New Issue
Block a user