From 0b7053425b0dfd049e0211bef5b7e3d9e264d1c8 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 30 May 2022 10:32:12 +0200 Subject: [PATCH] chore: leave Resizable mask in place --- shell/browser/native_window_mac.mm | 3 ++- shell/browser/ui/cocoa/electron_ns_window_delegate.mm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index fb03ce72a121b..71b5dbb7aad9b 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -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; } diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 2b357ad7a8151..f9b7a1170d1de 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -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 {