Skip to content

Commit

Permalink
fix: Disable new fade animation for BrowserViews (#14913)
Browse files Browse the repository at this point in the history
  • Loading branch information
trop[bot] authored and MarshallOfSound committed Oct 2, 2018
1 parent 385b088 commit 8d36215
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions atom/browser/native_window_mac.mm
Expand Up @@ -1019,13 +1019,17 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
}

void NativeWindowMac::SetBrowserView(NativeBrowserView* view) {
[CATransaction begin];
[CATransaction setDisableActions:YES];

if (browser_view()) {
[browser_view()->GetInspectableWebContentsView()->GetNativeView()
removeFromSuperview];
set_browser_view(nullptr);
}

if (!view) {
[CATransaction commit];
return;
}

Expand All @@ -1035,6 +1039,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
positioned:NSWindowAbove
relativeTo:nil];
native_view.hidden = NO;

[CATransaction commit];
}

void NativeWindowMac::SetParentWindow(NativeWindow* parent) {
Expand Down

0 comments on commit 8d36215

Please sign in to comment.