| Index: ui/views/cocoa/bridged_native_widget.mm
|
| diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
|
| index ce3731d026165eb42ef39e0b00bafe6953e2fcf9..7fdc5f342792acb8c9b9e3749c32f2965210b79d 100644
|
| --- a/ui/views/cocoa/bridged_native_widget.mm
|
| +++ b/ui/views/cocoa/bridged_native_widget.mm
|
| @@ -363,6 +363,8 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
| DCHECK(child_windows_.empty());
|
| SetFocusManager(nullptr);
|
| SetRootView(nullptr);
|
| +
|
| + DCHECK(![window_ isVisible]);
|
| DestroyCompositor();
|
| }
|
|
|
| @@ -681,6 +683,11 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
| }
|
|
|
| void BridgedNativeWidget::OnWindowWillClose() {
|
| + // Hide the window before closing. This ensures that destroying the compositor
|
| + // during the close does not cause a flash, which would be the case if the
|
| + // window was still visible.
|
| + SetVisibilityState(HIDE_WINDOW);
|
| +
|
| native_widget_mac_->GetWidget()->OnNativeWidgetDestroying();
|
|
|
| // Ensure BridgedNativeWidget does not have capture, otherwise
|
|
|