diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 3f7c689bfc8b..04fa6781dd1f 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -221,6 +221,12 @@ using FullScreenTransitionState = [super windowDidResize:notification]; shell_->NotifyWindowResize(); shell_->RedrawTrafficLights(); + // When reduce motion is enabled windowDidResize is only called once after + // a resize and windowDidEndLiveResize is not called. So we need to call + // handleZoomEnd here as well. + if (NSWorkspace.sharedWorkspace.accessibilityDisplayShouldReduceMotion) { + [self handleZoomEnd]; + } } - (void)windowWillMove:(NSNotification*)notification { @@ -276,9 +282,7 @@ using FullScreenTransitionState = return YES; } -- (void)windowDidEndLiveResize:(NSNotification*)notification { - resizingHorizontally_.reset(); - shell_->NotifyWindowResized(); +- (void)handleZoomEnd { if (is_zooming_) { if (shell_->IsMaximized()) shell_->NotifyWindowMaximize(); @@ -288,6 +292,12 @@ using FullScreenTransitionState = } } +- (void)windowDidEndLiveResize:(NSNotification*)notification { + resizingHorizontally_.reset(); + shell_->NotifyWindowResized(); + [self handleZoomEnd]; +} + - (void)windowWillEnterFullScreen:(NSNotification*)notification { // Store resizable mask so it can be restored after exiting fullscreen. is_resizable_ = shell_->HasStyleMask(NSWindowStyleMaskResizable);