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:
Gellert Hegyi 2020-07-23 02:54:32 +02:00 committed by GitHub
parent b57f5086ef
commit 6fa3406912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {
if (self.vibrantView != nil) {
return [self cornerMask];
} else {
return [super _cornerMask];
}
}
// Quicklook methods