mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
fix: don't allow window to go behind menu bar on mac (#22770)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user