Skip to content

Commit

Permalink
fix: properly order out child windows (#29887)
Browse files Browse the repository at this point in the history
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
trop[bot] and codebytere committed Jun 25, 2021
1 parent 54a7f6d commit a6f26b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shell/browser/native_window_mac.mm
Expand Up @@ -706,6 +706,15 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
return;
}

// Hide all children of the current window before hiding the window.
// components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
// expects this when window visibility changes.
if ([window_ childWindows]) {
for (NSWindow* child in [window_ childWindows]) {
[child orderOut:nil];
}
}

// Deattach the window from the parent before.
if (parent())
InternalSetParentWindow(parent(), false);
Expand Down

0 comments on commit a6f26b5

Please sign in to comment.