Merge pull request #7944 from electron/autorelease-effect-view
Autorelease NSVisualEffectView
This commit is contained in:
commit
8a29604f1e
1 changed files with 3 additions and 5 deletions
|
@ -1227,13 +1227,11 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
|||
|
||||
NSVisualEffectView* effect_view = (NSVisualEffectView*)vibrant_view;
|
||||
if (effect_view == nil) {
|
||||
effect_view = [[NSVisualEffectView alloc] initWithFrame:
|
||||
[[window_ contentView] bounds]];
|
||||
effect_view = [[[NSVisualEffectView alloc]
|
||||
initWithFrame: [[window_ contentView] bounds]] autorelease];
|
||||
[window_ setVibrantView:(NSView*)effect_view];
|
||||
|
||||
[effect_view setAutoresizingMask:
|
||||
NSViewWidthSizable | NSViewHeightSizable];
|
||||
|
||||
[effect_view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||
[effect_view setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
|
||||
[effect_view setState:NSVisualEffectStateActive];
|
||||
[[window_ contentView] addSubview:effect_view
|
||||
|
|
Loading…
Reference in a new issue