fix: properly order out child windows (#29821)

This commit is contained in:
Shelley Vohr 2021-06-24 20:43:28 +02:00 committed by GitHub
parent 9b5dd5380f
commit f9bfd1da25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -553,6 +553,15 @@ void NativeWindowMac::Hide() {
return; 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. // Deattach the window from the parent before.
if (parent()) if (parent())
InternalSetParentWindow(parent(), false); InternalSetParentWindow(parent(), false);