fix: remove corner mask override to increase window resize performance (#24642)
* fix: remove corner mask override to increase window resize performance * uses corner mask only for vibrant view
This commit is contained in:
parent
b57f5086ef
commit
6fa3406912
1 changed files with 9 additions and 1 deletions
|
@ -17,6 +17,10 @@ bool ScopedDisableResize::disable_resize_ = false;
|
|||
|
||||
} // namespace electron
|
||||
|
||||
@interface NSWindow (PrivateAPI)
|
||||
- (NSImage*)_cornerMask;
|
||||
@end
|
||||
|
||||
@implementation ElectronNSWindow
|
||||
|
||||
@synthesize acceptsFirstMouse;
|
||||
|
@ -158,7 +162,11 @@ bool ScopedDisableResize::disable_resize_ = false;
|
|||
// By overriding this built-in method the corners of the vibrant view (if set)
|
||||
// will be smooth.
|
||||
- (NSImage*)_cornerMask {
|
||||
return [self cornerMask];
|
||||
if (self.vibrantView != nil) {
|
||||
return [self cornerMask];
|
||||
} else {
|
||||
return [super _cornerMask];
|
||||
}
|
||||
}
|
||||
|
||||
// Quicklook methods
|
||||
|
|
Loading…
Reference in a new issue