fix: don't allow window to go behind menu bar on mac (#22770)
This commit is contained in:
parent
07cd70a37e
commit
bdef77bad8
2 changed files with 10 additions and 4 deletions
|
@ -89,11 +89,11 @@ bool ScopedDisableResize::disable_resize_ = false;
|
|||
if (electron::ScopedDisableResize::IsResizeDisabled())
|
||||
return [self frame];
|
||||
|
||||
NSRect result = [super constrainFrameRect:frameRect toScreen:screen];
|
||||
// Enable the window to be larger than screen.
|
||||
if ([self enableLargerThanScreen])
|
||||
return frameRect;
|
||||
else
|
||||
return [super constrainFrameRect:frameRect toScreen:screen];
|
||||
result.size = frameRect.size;
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void)setFrame:(NSRect)windowFrame display:(BOOL)displayViews {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue