merge master into fix-fullscreen-with-resizable-flag.

This commit is contained in:
Vanessa Yuen
2017-09-12 18:33:40 -04:00
2 changed files with 24 additions and 0 deletions

View File

@@ -173,6 +173,7 @@ bool ScopedDisableResize::disable_resize_ = false;
atom::NativeWindowMac* shell_;
bool is_zooming_;
int level_;
bool is_resizable_;
}
- (id)initWithShell:(atom::NativeWindowMac*)shell;
@end
@@ -335,6 +336,9 @@ bool ScopedDisableResize::disable_resize_ = false;
}
- (void)windowWillEnterFullScreen:(NSNotification*)notification {
// Setting resizable to true before entering fullscreen
is_resizable_ = shell_->IsResizable();
shell_->SetResizable(true);
// Hide the native toolbar before entering fullscreen, so there is no visual
// artifacts.
if (base::mac::IsAtLeastOS10_10() &&
@@ -394,6 +398,7 @@ bool ScopedDisableResize::disable_resize_ = false;
}
- (void)windowDidExitFullScreen:(NSNotification*)notification {
shell_->SetResizable(is_resizable_);
shell_->NotifyWindowLeaveFullScreen();
}