Skip to content

Commit

Permalink
chore: leave Resizable mask in place
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed May 30, 2022
1 parent fbdb0be commit 0b70534
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion shell/browser/native_window_mac.mm
Expand Up @@ -815,7 +815,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
}

bool NativeWindowMac::IsResizable() {
bool in_fs_transition = fullscreen_transition_state() != FullScreenTransitionState::NONE;
bool in_fs_transition =
fullscreen_transition_state() != FullScreenTransitionState::NONE;
bool has_rs_mask = [window_ styleMask] & NSWindowStyleMaskResizable;
return has_rs_mask && !IsFullscreen() && !in_fs_transition;
}
Expand Down
3 changes: 2 additions & 1 deletion shell/browser/ui/cocoa/electron_ns_window_delegate.mm
Expand Up @@ -238,8 +238,9 @@ - (void)windowWillEnterFullScreen:(NSNotification*)notification {

shell_->NotifyWindowWillEnterFullScreen();

// Save resizable value before entering fullscreen.
// Setting resizable to true before entering fullscreen.
is_resizable_ = shell_->IsResizable();
shell_->SetResizable(true);
}

- (void)windowDidEnterFullScreen:(NSNotification*)notification {
Expand Down

0 comments on commit 0b70534

Please sign in to comment.